JQuery 获得元素的方法

获取一个元素的值可以有很多方式:
<input type="text" id="txt" class="ipt" name="uname" />

通过ID选择器:$("#txt").val();
通过class选择器:$(".ipt").val();
通过属性选择器:$("input[name='uname']").val();
原文地址:https://www.cnblogs.com/qiaoyanlin/p/6705748.html