10 examples of 'jquery keyup get value' in JavaScript

Every line of 'jquery keyup get value' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
168'dom:.edit/keyup': function onEditKeyUp($event) {
169 var $li = $($event.currentTarget).closest('li');
170
171 switch ($event.keyCode) {
172 case ENTER_KEY:
173 $li
174 .find('input')
175 .focusout();
176 break;
177
178 case ESC_KEY:
179 $li
180 .find('input')
181 .val($li.find('label').text())
182 .focusout();
183 break;
184 }
185},
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

13function getValue() {
14 var tel = $('#tel').val();
15 var password = $('#password').val();
16 var code = $('#imgcode').val();
17
18 // 验证邮箱
19 if (!testData(tel, 'mobile')) {
20 $.tip({
21 msg: '请输入正确的手机!',
22 type: 'danger',
23 time: 3000
24 });
25 return false;
26 }
27
28 // 验证密码
29 if (password === '') {
30 $.tip({
31 msg: '密码不能为空!',
32 type: 'danger',
33 time: 3000
34 });
35 return false;
36 }
37
38 if(code === '') {
39 $.tip({
40 msg: '验证码不能为空',
41 type: 'danger',
42 time: 3000
43 });
44 return false;
45 }
46
47 return {
48 tel: tel,
49 code: code,
50 password: password
51 }
52}
104function keyup(e,text)
105{
106 if(text.value.length == 3 && ((e.keyCode >47 && e.keyCode <58) ||(e.keyCode >95 && e.keyCode <106)))
107 text.form[(getIndex(text)+1) % text.form.length].focus();
108}
201function zzt_KeyUp(e) {
202 switch (e.which) {
203 case 13: PAD_ENTER=0; return;
204 case 27: PAD_ESC=0; return;
205
206 case 33: PAD_PGUP=0; return;
207 case 34: PAD_PGDOWN=0; return;
208 // down
209 case 40: PAD_DOWN=0; return;
210 // up
211 case 38: PAD_UP=0; return;
212 // left
213 case 37: PAD_LEFT=0; return;
214 // right
215 case 39: PAD_RIGHT=0; return;
216 case 16: PAD_SHIFT=0; return;
217 case 80: PAD_PAUSE=0; return;
218 }
219 return;
220}
135} }, { reg: /^text-align:(.+)/g, setValue: function setValue(v) {
136 $("#text-align").val(v);
137} }, { reg: /^text-decoration:(.+)/g, setValue: function setValue(v) {
92reg: /^height:(\d+)px/g, setValue: function setValue(v) {
93 $("#height").val(v);
94}
160handleKeyUp(e) {
161 this.suggestPanel.handleKeyUp(e);
162}
32function setValue() {
33 $( '#editor1' ).val( $( 'input#val' ).val() );
34}
70private handleOnKeyUp(e: React.KeyboardEvent<HTMLInputElement>) {
71 if (this.props.onKeyUp) {
72 this.props.onKeyUp(e);
73 }
74}
23function setValue(id, value, onChange) {
24 var $value = $('#' + id + '.value');
25 if ($value.attr('type') === 'checkbox') {
26 $value.prop('checked', value).change(function() {
27 onChange();
28 });
29 } else {
30 $value.val(value).change(function() {
31 if ($(this).attr('id') === 'license') {
32 if ($(this).val()) {
33 $('#check').button('enable');
34 } else {
35 $('#check').button('disable');
36 }
37 $('#checkResult').html();
38 }
39 onChange();
40 }).keyup(function() {
41 $(this).trigger('change');
42 });
43 }
44}

Related snippets