当前位置:网站首页>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>
边栏推荐
- Mysql - - Index
- MySQL——JDBC
- Transformation between yaml, Jason and Dict
- Hcie security Day12: supplement the concept of packet filtering and security policy
- 常用sql集合
- Qualcomm platform WiFi -- P2P issue
- @Transactional注解失效的场景
- Tidb's initial experience of ticdc6.0
- [vulnhub shooting range] impulse: lupinone
- Nmap and masscan have their own advantages and disadvantages. The basic commands are often mixed to increase output
猜你喜欢
The "boss management manual" that is wildly spread all over the network (turn)
MySQL - index
QFileDialog
(5) User login - services and processes - History Du touch date stat CP
Implementation principle of inheritance, encapsulation and polymorphism
@Transactional注解失效的场景
Selenium has three waiting methods (forced waiting, implicit waiting, and display waiting)
No more! Technical team members resign collectively
[vulnhub shooting range] impulse: lupinone
Basic preprocessing and data enhancement of image data
随机推荐
淺析 Ref-NeRF
Tidb's initial experience of ticdc6.0
Hcie security Day11: preliminarily learn the concepts of firewall dual machine hot standby and vgmp
Ask and answer: dispel your doubts about the virtual function mechanism
Service discovery and load balancing mechanism -service
[vulnhub shooting range] impulse: lupinone
MySQL - database backup
Global and Chinese market of telematics boxes 2022-2028: Research Report on technology, participants, trends, market size and share
鹏城杯 WEB_WP
Notes on MySQL related knowledge points (startup, index)
Station B, dark horse programmer, employee management system, access conflict related (there is an unhandled exception at 0x00007ff633a4c54d (in employee management system.Exe): 0xc0000005: read locat
MySQL -- standardize database design
4. Data splitting of Flink real-time project
Leetcode daily question 540 A single element in an ordered array Valentine's Day special article looking for a single dog in a pile of lovers ~ the clown is myself
(5) User login - services and processes - History Du touch date stat CP
常用sql集合
[Yugong series] go teaching course 002 go language environment installation in July 2022
gslb(global server load balance)技術的一點理解
Under the double reduction policy, research travel may become a big winner
Such as the visual appeal of the live broadcast of NBA Finals, can you still see it like this?