2
IE6,7,8此代碼不起作用如何使用fireevent IE8?
有人幫助我。
我該如何解決?
<script type="text/javascript">
function call (event) {
if (document.createEventObject) { // IE before version 9
var mouseclickEvent = document.createEventObject (window.event);
mouseclickEvent.button = 1; // left button is down
document.getElementById("test4").fireEvent ("onclick", mousedownEvent);
}
}
</script>
<body>
<button id="test" onmouseover="call (event);">call</button>
<input id="test3" type="file" onclick="alert(6)"/>
</body>