[Info] JS nuGetValue(), nuSetValue()
Posted: Wed Aug 04, 2021 10:46 am
The JavaScript functions nuGetValue() and nuSetValue()
make it easy to get and set an object's value without having to know the JavaScript/jQuery syntax that may differ from object to object.
Examples:
1. To get the selected option text of a Select object with jQuery:
and with nuGetValue():
2. To get the Checkbox value in jQuery:
and with nuGetValue():
2. To set the value of an Input object:
and with nuSetValue():
make it easy to get and set an object's value without having to know the JavaScript/jQuery syntax that may differ from object to object.
Examples:
1. To get the selected option text of a Select object with jQuery:
Code: Select all
$("#objectId option:selected").text();
Code: Select all
nuGetValue('objectId','text');
Code: Select all
$('#objectId').is(":checked")
Code: Select all
nuGetValue('objectId');
Code: Select all
$('#objectId').val('something').change();
Code: Select all
nuSetValue('objectId',''something');