1。JQUERYを使用します
$( "input [name = 'btnadd']")。attr( "value"))
値属性値を取得すると、attrに置き換えられた他の属性のパラメーターがOKです
2。ポイントを通り抜けてください:
<!doctype html> <html lang = "en"> <head> <meta charset = "utf-8"> <title> document> document> document> document> < /title> < /head> <body> <body> <form id = "form1" name = "form1" /></form> <script> window.onload = function(){var inputs = document.form1.getelementsByTagname( "input"); for(var i = 0; i <inputs.length; i ++){inputs [i] .onclick = function(){alert(this.name); }; }}; </script> </body> </html>上記は、編集者が提起した入力タグのすべての属性を取得する方法の完全な内容です。誰もがwulin.comをもっとサポートすることを願っています〜