当前位置:网站首页>DOM light switch case
DOM light switch case
2022-07-03 21:37:00 【Rice field prospector】
<body>
<img src="./off.gif" id="light">
<script> //1. Get the picture object var light = document.getElementById("light"); var flag = false;// It means that the light is off //2. Bind click event light.onclick = function(){
if(flag){
// Judge if the light is on, then turn it off light.src = "./on.gif" flag = false; }else{
// Judge if the light is off, turn it on light.src = "./off.gif" flag = true; } } </script>
</body>
边栏推荐
- (5) User login - services and processes - History Du touch date stat CP
- Getting started with postman -- environment variables and global variables
- Qualcomm platform WiFi -- P2P issue
- Tidb's initial experience of ticdc6.0
- Rhcsa third day notes
- 2022-02-15 Daily: 2022 AAAI fellow release
- Décompiler et modifier un exe ou une DLL non source en utilisant dnspy
- Global and Chinese market of wireless hard disk 2022-2028: Research Report on technology, participants, trends, market size and share
- MySQL——索引
- Dahua series books
猜你喜欢
Yyds dry goods inventory TCP & UDP
QT6 QML book/qt quick 3d/ Basics
treevalue——Master Nested Data Like Tensor
内存分析器 (MAT)
The "boss management manual" that is wildly spread all over the network (turn)
技术管理进阶——如何在面试中考察候选人并增大入职概率
常用sql集合
Notes on MySQL related knowledge points (startup, index)
Transformer structure analysis and the principle of blocks in it
Pengcheng cup Web_ WP
随机推荐
Tidb's initial experience of ticdc6.0
Read the root directory of the folder, write txt and generate random samples
Basic preprocessing and data enhancement of image data
上周内容回顾
Software testing skills, JMeter stress testing tutorial, obtaining post request data in x-www-form-urlencoded format (24)
Basic number theory -- Chinese remainder theorem
QT6 QML book/qt quick 3d/ Basics
[secretly kill little buddy pytorch20 days -day02- example of image data modeling process]
Is flush account opening and registration safe and reliable? Is there any risk?
Capture de paquets et tri du contenu externe - - autoresponder, composer, statistiques [3]
Capturing and sorting out external articles -- autoresponder, composer, statistics [III]
Remember the experience of automatically jumping to spinach station when the home page was tampered with
The White House held an open source security summit, attended by many technology giants
MySQL——JDBC
MySQL——SQL注入问题
Qualcomm platform WiFi -- P2P issue
Scientific research document management Zotero
Compréhension de la technologie gslb (Global Server load balance)
Go learning notes (4) basic types and statements (3)
Redis concludes that the second pipeline publishes / subscribes to bloom filter redis as a database and caches RDB AOF redis configuration files