我有一個像如何使用屬性
<input id="inp__str_Object__17" type="checkbox" name="inp__str_Object__17" sym_name="Cust_attr_1" value="400024" >
複選框使用sym_name =「Cust_attr_1」使用JavaScript我如何能得到ID(inp__str_Object__17)
像document.getAttribute("SYM_NAME")
得到一個輸入型的ID
看看這裏http://stackoverflow.com/questions/6267816/getting-element-by-a-custom-attribute-using-javascript – 2013-05-02 09:12:09
的http:// stackoverflow.com/questions/9496427/how-to-get-elements-by-attribute-selector-w-native-javascript-wo-queryselector – tbleckert 2013-05-02 09:13:04