Giriraj Govil
Giriraj Govil

Reputation: 217

How to blank the hidden field value from Jquery

Assume that a hidden field

<input type="hidden" id="hdn" name="hdn" value="100" />

So i want to blank the value of hidden field using Jquery. In javascript we can blank using this syntax

document.getElementById("hdn").value = '';

but i want it using jquery.

Upvotes: 1

Views: 6914

Answers (1)

Ionuț G. Stan
Ionuț G. Stan

Reputation: 179119

$("#hdn").val("");

http://docs.jquery.com/Attributes/val

Upvotes: 5

Related Questions