JavaScript DOM 制作搜索框,outline 去掉文本框获取焦点时候的颜色
2016-06-16 13:24
459 查看
<!doctype html> <html> <head> <meta charset="utf-8"> <title>无标题文档</title> <style type="text/css"> body { background-color: #F7F7F7; font-family: "Courier New", Courier, monospace; } .wrap { width: 70%; height: 500px; margin: 0 auto; } .search_ss1{ margin-top:70px; } .search1{ width:500px; height:30px; border:1px solid #E7ECF0; } .search2{ width:110px; height:34px; background-color:#4478CE; border:1px solid #4478CE; color:#FFF; font-family:"Courier New", Courier, monospace; font-size:18px; margin-top:70px; } .search1:focus{ outline:none; } </style> <script> function textlength() { var keyword=document.getElementById("product"); if(keyword.value==keyword.defaultValue) { keyword=null; } else { keyword.defaultValue=""; } } </script> </head> <body> <div class="wrap"> <form id="formsearch" name="form1" method="post" action="123.asp"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td><div class="search_ss1"> <input id="product" name="keyword" type="text" class="search1" value="请输入您要搜索的产品关键词" onpropertychange="textlength()" oninput="textlength()" autocomplete="off" /> </div> </td> <td><input type="submit" value="搜索" class="search2" /></td> </tr> </table> </form> </div> </body> </html>
相关文章推荐
- JavaScript DOM 制作搜索框,outline 去掉文本框获取焦点时候的颜色
- JavaScript DOM 制作搜索框,outline 去掉文本框获取焦点时候的颜色
- JavaScript DOM 制作搜索框,outline 去掉文本框获取焦点时候的颜色
- JavaScript DOM 制作搜索框,outline 去掉文本框获取焦点时候的颜色
- JavaScript DOM 制作搜索框,outline 去掉文本框获取焦点时候的颜色
- JavaScript DOM 制作搜索框,outline 去掉文本框获取焦点时候的颜色
- JavaScript DOM 制作搜索框,outline 去掉文本框获取焦点时候的颜色
- JavaScript DOM 制作搜索框,outline 去掉文本框获取焦点时候的颜色
- JavaScript DOM 制作搜索框,outline 去掉文本框获取焦点时候的颜色
- JavaScript DOM 制作搜索框,outline 去掉文本框获取焦点时候的颜色
- Javascript缓存API
- JavaScript常用正则表达式(定时更新)
- JS去除div中的style
- js json对象操作,及dialog总是显示在屏幕中心 笔记
- JavaScript对象类型详解
- Javascript的匿名函数与自执行
- js版本问题
- JS之——设置cookie 删除cookie
- 在jstl表达式中嵌入el表达式
- JSON字符串和对象相互转换实例分析