The example in this article describes how to implement JS CSS to display the selected cells indentedly. Share it with everyone for your reference. The specific implementation method is as follows:
JS CSS implementation can display the selected cell indented
<script><br>
function overbutton(){<br>
if(src=event.srcElement)<br>
if(src.className=="normal"){<br>
src.className='hover';<br>
}<br>
}<br>
function outbutton(){<br>
if(src=event.srcElement)<br>
if(src.className=="hover"){<br>
src.className='normal';<br>
}<br>
}<br>
function clickbutton(){<br>
if(src=event.srcElement)<br>
if(src.className=="hover"){<br>
var cells=document.all.button.rows[0].cells;<br>
for (i=0;i<cells.length ;i )<br />
{cells[i].className="normal";<br />
}<br />
src.className='click';<br />
}<br />
}</p>
<p>document.onmouseover=overbutton<br />
document.onmouseout=outbutton<br />
document.onclick=clickbutton</script>
I hope this article will be helpful to everyone’s JavaScript programming design.