10 examples of 'jquery change value of input' in JavaScript

Every line of 'jquery change value of input' 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
255private updateDom_select(element: JQuery, value: any) {
256 element.val(value);
257}
197private updateDom(element: JQuery, 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}
2286value: function _updateInput() {
2287 var value = this.color.toString();
2288 if (this.isEmpty) {
2289 value = '';
2290 }
2291 this._trigger('change', value);
2292 this.$element.val(value);
2293}
78function onInputSelect(element) {
79 element.css('color', '#000000');
80 element.val('');
81}
161function setInputValue(id,val){
162 var obj = document.getElementById(id);
163 if(obj == null) return;
164 obj.value=val;
165}
33function handleChanges(element) {
34 if ($(element).is(':checkbox')) {
35 var initialValue = '';
36 if ($(element).is(':checked')) {
37 initialValue = 'checked';
38 } else {
39 initialValue = 'unchecked';
40 }
41 $(element).data('initialValue', initialValue);
42 } else {
43 $(element).data('initialValue', $(element).val());
44 }
45 $(element).data('defaultValue', $(element).attr('title'));
46}
71function changeInput(value) {
72 glitchAmount = Number(value);
73}
89function updateInput( input, value )
90{
91 if ( input && getInputValue( input ) !== value && typeof value !== 'undefined' )
92 {
93 setInputValue( input, value );
94 }
95}
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