zoukankan
html css js c++ java
JS批量添加属性。
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<
html
xmlns
="http://www.w3.org/1999/xhtml"
>
<
head
>
<
meta
http-equiv
="Content-Type"
content
="text/html; charset=gb2312"
/>
<
title
>
无标题文档
</
title
>
<
style
>
img
{
}
{
border
:
1px solid #ccc
;
cursor
:
pointer
;
padding
:
4px
;
}
</
style
>
</
head
>
<
body
>
<
div
id
="test"
>
<
img
src
="http://bbs.blueidea.com/images/blue/logo.gif"
alt
="logo"
/>
<
img
src
="http://bbs.blueidea.com/images/blue/logo.gif"
alt
="logo"
/>
<
img
src
="http://bbs.blueidea.com/images/blue/logo.gif"
alt
="logo"
/>
<
img
src
="http://bbs.blueidea.com/images/blue/logo.gif"
alt
="logo"
/>
<
img
src
="http://bbs.blueidea.com/images/blue/logo.gif"
alt
="logo"
/>
<
img
src
="http://bbs.blueidea.com/images/blue/logo.gif"
alt
="logo"
/>
<
img
src
="http://bbs.blueidea.com/images/blue/logo.gif"
alt
="logo"
/>
<
img
src
="http://bbs.blueidea.com/images/blue/logo.gif"
alt
="logo"
/>
<
img
src
="http://bbs.blueidea.com/images/blue/logo.gif"
alt
="logo"
/>
<
img
src
="http://bbs.blueidea.com/images/blue/logo.gif"
alt
="logo"
/>
<
img
src
="http://bbs.blueidea.com/images/blue/logo.gif"
alt
="logo"
/>
</
div
>
</
body
>
<
script
type
="text/javascript"
>
var
imglist
=
document.getElementById(
"
test
"
).getElementsByTagName(
"
img
"
);
for
(
var
i
=
0
;i
<
imglist.length;i
++
)
{
imglist[i].onmouseover
=
function
()
{
this
.style.borderColor
=
"
#f60
"
;
}
imglist[i].onmouseout
=
function
()
{
this
.style.borderColor
=
"
#369
"
;
}
}
</
script
>
</
html
>
查看全文
相关阅读:
python 包与模块
互斥锁与自旋锁
TCP三次握手四次挥手
缓存击穿、缓存穿透、缓存雪崩
五种IO模型
MySQL使用mysqldump进行数据备份
golang数据库连接池参数设置
golang代码文件目录组织、包目录组织学习笔记
【转】如何用Vim提高开发效率
emacs显示行号
原文地址:https://www.cnblogs.com/CB/p/1138961.html
最新文章
jquery slideVeiw
wc
grep
gdb
c++协程
lua源码:Tvalue
lua:协程
lua:函数与Closure
写出高质量的代码
一些数据库的坑
热门文章
网络游戏的邮件系统设计
anaconda安装 与 共享虚拟环境 2020
Kappa 统计量
查看Python已经安装包名称已经版本号的两个命令
二分类模型评估之AUC ROC
python3.x 中map对象的访问方式
DataFrame的空值填充问题,以及由此引发的SettingWithCopy错误?
git 日志无法正常显示中文,解决方法
如何使用git将remote master上的内容merge 到自己的开发分支上 & 以及将自己分支的内容merge到remote master上
TensorBoard:Visualizing Learning 学习笔记
Copyright © 2011-2022 走看看