Home > Web Front-end > JS Tutorial > JS CSS realizes the method of recessed display of selected cells_javascript skills

JS CSS realizes the method of recessed display of selected cells_javascript skills

WBOY
Release: 2016-05-16 16:11:53
Original
1374 people have browsed it

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:

Copy code The code 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>











Daily News Weekly Report Monthly report Quarterly Report Daily Report Weekly Report Monthly report Quarterly Report


I hope this article will be helpful to everyone’s JavaScript programming design.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template