想通过javascript函数调用enter键

时间:2012-01-01 07:52:13

标签: javascript

想要通过javascript函数自动调用enter键:

例如:

document.getElementById("sd").focus();//set focus in a text box
//then call enter key press event using java script

 var e= window.event// of type keypress
e.keyCode=13;

//and execute the manualy created event e.

0 个答案:

没有答案