Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 jquery 中使用 name 属性而不是 id 属性获取框值谢谢
尝试这个
$('input[name="hello"]').val()
<input type="text" name="textfield123" value="something" /> <script> var valueoftextfield = document.getElementsByName('textfield123') </script>
你需要这样的东西吗?