标签:ntb put blur 获取 焦点 col get style cti
代码示例:
<body> <input type="text" placeholder="请输入任意内容" id="input"> <script> //获取DOM元素 var input=document.getElementById("input"); //获取焦点 input.onfocus=function(){ this.style.width="400px"; this.style.height="50px"; this.style.border=‘2px solid yellow‘; } //失去焦点 input.onblur=function(){ this.style.color="blue"; this.style.width="200px"; } </script> </body>
标签:ntb put blur 获取 焦点 col get style cti
原文地址:https://www.cnblogs.com/zhang-jiao/p/9612963.html