c#中的回車jsp
<HEAD>
<script type="text/Jscript">
function KeyDownHandler(btnEnter)
{
// process only the Enter key
if (event.keyCode == 13)
{
// cancel the default submit
event.returnValue=false;
event.cancel = true;
// submit the form by programmatically clicking the specified button
btnEnter.click();
}
}
</script>
</HEAD>
引用:
<asp:textbox id="txtMachine" onkeydown="KeyDownHandler(btnFaultType)" .......
btnFaultType為運行按鈕.
<script type="text/Jscript">
function KeyDownHandler(btnEnter)
{
// process only the Enter key
if (event.keyCode == 13)
{
// cancel the default submit
event.returnValue=false;
event.cancel = true;
// submit the form by programmatically clicking the specified button
btnEnter.click();
}
}
</script>
</HEAD>
引用:
<asp:textbox id="txtMachine" onkeydown="KeyDownHandler(btnFaultType)" .......
btnFaultType為運行按鈕.