10 examples of 'change value input jquery' in JavaScript

Every line of 'change value input jquery' 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
255private updateDom_select(element: JQuery<HTMLElement>, value: any) {
256 element.val(value);
257}
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

197private updateDom(element: JQuery<HTMLElement>, value: any) {
198 let tag = element.prop('tagName');
199 switch (tag) {
200 case 'INPUT':
201 this.updateDom_input(element, value);
202 break;
203 case 'TEXTAREA':
204 this.updateDom_normal(element, value);
205 break;
206 case 'SELECT':
207 this.updateDom_select(element, value);
208 break;
209 default:
210 this.updateDom_normal(element, value);
211 }
212}
7function updateCustomValue(input,inputText) {
8 id = escapeId(input.attr('id')) + "_OldValue";
9 jQuery("input#" + id).val( inputText);
10 jQuery("input#" + escapeId(input.attr('id')) + "_AutoComplete").val("custom");
11 var name = escapeId(input.attr('id'));
12 jQuery("input[name='" + name + "']").val(jQuery("input#" + id).val());
13}
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}
161function setInputValue(id,val){
162 var obj = document.getElementById(id);
163 if(obj == null) return;
164 obj.value=val;
165}
32function setValue() {
33 $( '#editor1' ).val( $( 'input#val' ).val() );
34}
71function changeInput(value) {
72 glitchAmount = Number(value);
73}
19function setValue(id, value, onChange) {
20 var $value = $('#' + id + '.value');
21 if ($value.attr('type') === 'checkbox') {
22 $value.prop('checked', value).change(function () {
23 onChange();
24 });
25 } else {
26 $value.val(value).on('change', function() {
27 onChange();
28 }).keyup(function() {
29 // Check that only numbers entered
30 if ($(this).hasClass('number')) {
31 var val = $(this).val();
32 if (val) {
33 var newVal = '';
34 for (var i = 0; i < val.length; i++) {
35 if ((val[i] >= '0' && val[i] <= '9') || val[i] === '-' || val[i] === '+' || val[i] === '.' || val[i] === ',') {
36 if (val[i] === '.' && convertComma === true) val[i] = ',';
37 if (val[i] === ',' && convertComma === false) val[i] = '.';
38 newVal += val[i];
39 }
40 }
41
42 if (val != newVal) {
43 $(this).val(newVal);
44 }
45 }
46 }
47 $(this).trigger('change');
48 });
49 }
50}
78function onInputSelect(element) {
79 element.css('color', '#000000');
80 element.val('');
81}
54changeValue(event) {
55 this.setState({ init: false });
56 const { setValue, type } = this.props;
57 const target = event.currentTarget;
58 if (type !== 'checkbox') {
59 setValue(target.value);
60 }
61}

Related snippets