js jquery给input标签赋值、取值

版权声明:博客知识产权来源命运的信徒,切勿侵权 https://blog.csdn.net/qq_37591637/article/details/88989199

html代码

<input type="text" id="name"/>


赋值

      $("#name").val('test');//赋值

 取值

var name=$("#name").val();

猜你喜欢

转载自blog.csdn.net/qq_37591637/article/details/88989199