undefined error in checkbox

admin

Administrator
Staff member
<script>
function contactdelete()
{
var checkbox1 = document.contactlist.fordelete;

var t=checkbox1.length;
alert(t);

}
</script>
<html>
<body>
<form name="contactlist">
<input type=checkbox name=fordelete value=http://www.webdeveloper.com/forum/archive/index.php/"1">

<input type=button value=Delete onclick="contactdelete()">
</form>
</body>
</html>

error:

undefined.
the answer should be 1 butit is displaying undefined
 
Back
Top