在js和html标签中input onfocus的不同用法
2013-05-27 08:12
656 查看
在html标签中:
<input type="image" src="..." onFocus="src=' ' " onblur="src=' ...' " >
<input type="image" src="... " onFocus="this.style.backgroundImage='url(...)'" >
<input type="button" onFocus="this.style.border='green solid 2px'" onblur="this.style.border=''">
在js中添加标签:
<input type='password' placeholder='Enter Password' onfocus='this.style.backgroundImage=\"url(...)\"' onblur='this.style.backgroundImage=\"url(...)\"'/>\:
<input type="image" src="..." onFocus="src=' ' " onblur="src=' ...' " >
<input type="image" src="... " onFocus="this.style.backgroundImage='url(...)'" >
<input type="button" onFocus="this.style.border='green solid 2px'" onblur="this.style.border=''">
在js中添加标签:
<input type='password' placeholder='Enter Password' onfocus='this.style.backgroundImage=\"url(...)\"' onblur='this.style.backgroundImage=\"url(...)\"'/>\:
相关文章推荐
- 项目总结(4)关于label标签和input标签在angular.js中的用法
- 【HTML/CSS】 JS中form表单中的onsubmit监听返回 true或者false用法
- 【js与jquery】html中onsubmit事件的用法
- value在input标签不同情况有不同的用法
- js获取用户在input标签中输入的值,然后改变html下各个标签的值或者属性
- How to set the default input focus on a field in an HTML web form
- angularjs How to set focus on input field?
- 在html链接里执行js和使用标签事件执行的不同
- HTML 5开发与HTML 4在标签用法方面的不同
- 关于HTML在input标签内检测输入内容合法性和在js验证表单合法性后跳转到servlet的几点内容
- js循环输出不同样式和id的HTML标签
- html中不同种类的标签在js中接收值得不同方式
- js获得html中的input标签内容
- file输入框不允许js设置值 Failed to set the 'value' property on 'HTMLInputElement
- 简单的js限制html中input标签输入空格
- 实时监控文本框输入的信息,JS中的oninput & onpropertychange事件
- xss其他标签下的js用法总结
- HTML中a标签的rel属性使用 link标签的rel="search"用法
- JS获取当前年份,添加到HTML标签 select 的 option里
- js中insertAdjacentHTML的用法