jquery default value
Just use the defaultValue property:
var default_value = $(this).prop("defaultValue");
Or:
var default_value = this.defaultValue;
jquery default value
Just use the defaultValue property:
var default_value = $(this).prop("defaultValue");
Or:
var default_value = this.defaultValue;
how to give default value in jquery
<b>Reset Single</b>
<input type="text" id="TextBox">
<button id="reset">Reset</button>
<hr>
<b>Reset Many</b>
<div id="Many">
<input type="text" value="1">
<input type="text" value="5">
<input type="text" value="2">
<button id="ResetMany">Reset</button>
</div>
<script>
// Reset single
$("#reset").click(function (e) {
$("#TextBox").val("Value");
});
// Resets many given a selector
// Could be a form, containing div
$("#ResetMany").click(function (e) {
var inputs = $("input", "#Many");
for (var i = 0; i < inputs.length; i++) {
$(inputs[i]).val("Value");
}
});
</script>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us