JQuery JS by pressing the Enter key functions

I want to write a script to realize the function is to click the Enter key

Usually the artificial click enter the triggering event now want to script automatically trigger.

Please master pointing

Started by Jonas at December 12, 2016 - 6:15 PM

var WshShell = new ActiveXObject('WScript.Shell')
WshShell.SendKeys('{Enter}');

This script uses the'WScript.Shell'component but the browser security level is limited and there is no other way

Posted by Jonas at December 13, 2016 - 7:06 PM

No ActiveX no way.
However, you should realize that "press the Enter key" function to do what, maybe in other ways can do

Posted by Sidney at December 21, 2016 - 7:23 PM

$(document).keypress(function(e) {
if(e.which == 13) {
alert('jquery, You press the Enter key');
}
});

Posted by Corey at December 26, 2016 - 7:34 PM

Submit the form with document.formname.submit () on the line

Multiple lines of text to add \n textarea simulation.

Posted by Victoria at December 28, 2016 - 8:06 PM

$("html").die().live("keydown", function (event) {
if (event.keyCode == 13) {
alert("Capture the return");
}
});

Posted by Otis at January 10, 2017 - 8:53 PM

Wrong title GG

Posted by Otis at January 11, 2017 - 9:30 PM