随笔分类 - js
摘要:function $(id){return typeof id "string" ? document.getElementById(id) : id;}
阅读全文
摘要:html代码 <div> <label for="userid">ID</label> <input type="text" id="userid"> <button id="submit">查询</button> </div> <div id="show"> </div> <script> var
阅读全文
摘要:switch练习 <div> <label for="id">ID号</label> <input type="text" id="id" name="id"> <button id="submit">查询</button> </div> <div id="reveal"></div> <scrip
阅读全文
摘要:<div> <input type="text" id="s"> </div> <script> var s=document.getElementById('s'); addEventListener('keypress',function(ev){ // console.log(ev); if(
阅读全文
摘要:不注意看到的,保存以备后用 ['pushState','popstate','replaceState'].forEach(function(item,index){ window.addEventListener(item, fun); })
阅读全文
浙公网安备 33010602011771号