//html
<a href='http://www.baidu.com'><button id='sss'>百度</button></a>
// Native js
function trigger(){
//IE
if(document.all) {
document.getElementById("clickMe").click();
}
// other browsers
else {
var e = document.createEvent("MouseEvents");
e.initEvent( "click", true, true); //The click here can be replaced with the behavior you want to trigger
document.getElementById( "sss").dispatchEvent(e); //clickME here can be replaced with the DOM node you want to trigger the action
}
}
trigger()
//jq
$('#sss').trigger('click')