Menu
Can I add any custom attributes on an input element?
so If I have a regular checkbox
[CODE]
<input type=’checkbox’ name=’mycheckbox1′ > my checkbox
be able to add attributes to use in javascript. Such as
[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>
However this throws an error.
Is something like this possible?
thanks