最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to blank the hidden field value from Jquery - Stack Overflow

programmeradmin2浏览0评论

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.

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.

Share asked Aug 21, 2009 at 11:57 Giriraj GovilGiriraj Govil 2171 gold badge4 silver badges8 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5
$("#hdn").val("");

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

发布评论

评论列表(0)

  1. 暂无评论