Can I add any custom attributes on an input element?
so If I have a regular checkbox
be able to add attributes to use in javascript. Such asCode:<input type='checkbox' name='mycheckbox1' > my checkbox
However this throws an error.Code:<script language='javascript'> function doIt2(formname) { alert (formname.mycheckbox1.special); } </script> </head> <body> <input type='checkbox' name='mycheckbox1' special='xxxxx' onclick="doIt2(this)"> my checkbox </body> </html>
Is something like this possible?
thanks


Reply With Quote
Bookmarks