Esw*_*war 2 javascript jsf cursor
我想禁用鼠标左键单击.我使用以下脚本但不起作用.
<h:form>
<a4j:commandButton value="TestButton" onclick="alert('button cliked')"/>
</h:form>
Run Code Online (Sandbox Code Playgroud)
JavaScript是:
<script type="text/javascript">
document.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK);
document.onmousedown = clickIE4;
document.onmouseup = clickIE4;
document.onclick = clickIE4;
function clickIE4()
{
return false;
}
</script>
Run Code Online (Sandbox Code Playgroud)
帮我.谢谢你的努力.