标签:ack line cli use col button alt mamicode floor
<p id="para"></p> <script type="text/javascript"> let line = document.getElementById(‘para‘); let Room = [‘单人间‘,‘双人间‘,‘三人间‘,‘套房‘]; for(let i = 0;i<Room.length;i++){ line.innerHTML += i + Room[i] } </script>
0单人间1双人间2三人间3套房
<input type="input" name="" id="url" value="" /> <script type="text/javascript"> document.getElementById(‘url‘).value=window.location.href; </script>
<p id="test" onclick="uptext()">单击更改内容</p> <input type="button" name="" id="" value="更改内容" onclick="uptext()"/> <script type="text/javascript"> function uptext(){ document.getElementById(‘test‘).innerHTML = Math.floor(Math.random()*10); } </script>
<input type="button" name="" id="noun" value="按钮" onclick="show_text()" onmouseover = show_red() onmouseout = show_blue() style="background-color:blue;color:while;"/> <script> function show_red(){ let noun = document.getElementById(‘noun‘) noun.style.backgroundColor = ‘red‘; } function show_blue(){ let noun = document.getElementById(‘noun‘) noun.style.backgroundColor = ‘blue‘; } function show_text(){ alert(‘欢迎!‘) } </script>
标签:ack line cli use col button alt mamicode floor
原文地址:https://www.cnblogs.com/tanzizheng/p/12839908.html