123<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>4<title></title>5<script type= "Text/javascript" >6onload =function () {7 //get all the cells under Talbe in the page8 vartdobjs= document.getElementById (' TB '). getElementsByTagName (' TD '));9 //to iterate over cells to set properties on a cellTen for(vari = 0; i < tdobjs.length; i++) { One //set the value of the property score ATdobjs[i].setattribute (' Score ', (i + 1) * 10); - //register a Click event for each cell -Tdobjs[i].onclick =function () { theAlert This. getattribute (' Score ')); - }; - }; - + }; -</script> + A<body> at<input type= "button" name= "name" value= "Display Effect" id= "btn"/> -<table border= "1" id= "TB" > -<tr> -<td> - 1th One -</td> in<TD > - 2nd One to</td> +<td> - 3rd One the</td> *<td> $ 4th onePanax Notoginseng</td> -<td> the 5th One +</td> A</tr> the</table> +</body> -16JavaScript set a custom property for a cell and assign a value ======== how to take a value