标签:style blog http color io ar sp div on
<button type="button" onclick="goBaidu()">click</button> <script> function goBaidu(){ var a = document.createElement(‘a‘); var e = document.createEvent(‘MouseEvents‘); e.initEvent( ‘click‘, true, true ); a.href="http://www.baidu.com"; a.target="_blank"; a.dispatchEvent(e); } </script>
标签:style blog http color io ar sp div on
原文地址:http://www.cnblogs.com/huyajie/p/4042480.html