This article mainly introduces how jquery captures events triggered by the carriage return key. For more information, see
1. jquery: the code is as follows: $ ("html "). die (). live ("keydown", function (event) {if (event. keyCode = 13) {// here add the logic to be processed}); // bind the Carriage Return Action $ ('textarea [name = chattext] '). keydown (function (event) {if (event. which = 13) {}}); 2. jquery obtains multiple checkbox values: the code is as follows: $ ('input [type = "checkbox"] [name = "types"]: checked '). each (function () {types = types + $ (this ). val () + "|" ;}); 3. jquery asynchronous request method: the code is as follows: $. ajax ({url: "$ {pageContext. request. con TextPath}/UOSRoleManangerAction. do? Method = createRole ", type:" post ", dataType:" html ", data: {" roleName ": roleName," roleDescription ": roleDescription," roles ": roles, "types": types}, success: function (data) {var dataObj = eval ("(" + data + ")"); if (dataObj. result) {alert ("operation successful! "); SubmitForm (null," initPage ");} else {alert (" operation failed! ");}}});