var evt = document.createEvent("MouseEvents");
evt.initEvent("click", true, true);
document.getElementById("hello").dispatchEvent(evt);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>helloworld</title>
</head>
<body>
<div > hello world</div>
<input id="world" type="button" value="hello world" οnclick="world();"/>
<input id="hello" type="button" value="hello HBuilder" οnclick="alert('hello HBuilder');"/>
<script type="text/javascript">
function world(){
alert('hello world');
var evt = document.createEvent("MouseEvents");
evt.initEvent("click", true, true);
document.getElementById("hello").dispatchEvent(evt);
}
</script>
</body>
</html>