Home > Web Front-end > JS Tutorial > body text

Summary of the use of parentElement and srcElement_Basic knowledge

WBOY
Release: 2016-05-16 17:04:10
Original
1082 people have browsed it

复制代码 代码如下:





无标题文档
















Click Me!

1111111111111111
2222222222222222
3333333333333333
4444444444444444
5555555555555555

 




感觉这个挺好,可以捕获当前事件作用的对象,如event.srcElement.tagName可以捕获活动标记名称。
注意获取的标记都以大写表示,如"TD","TR","A"等。

偶应用event.srcElement把以前的一个代码重写了下,扩展了其功能,很简单的一段代码。

复制代码 代码如下:





无标题文档







 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
    
    
    




The instructions for using bordercolordark and bordercolorlight in the above Table are as follows:
The difference between bordercolordark and bordercolorlight in html

To present a three-dimensional form, two borders need to be bright and the remaining two borders must be dark. bordercolorlight and bordercolordark represent light and dark colors respectively.

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