L@_@K
<!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>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
<input type="checkbox" id="ck" />
<input type="image" id="img1" src="1.gif" alt="1.gif" />
<script type="text/javascript">
<!--
document.getElementById("ck").onclick = function()
{
var img = document.getElementById("img1");
if (this.checked)
{
img.src = "2.gif";
img.alt = "2.gif";
}
else
{
img.src = "1.gif";
img.alt = "1.gif";
}
};
//-->
</script>
</body>
</html>
<!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>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
<input type="checkbox" id="ck" />
<input type="image" id="img1" src="1.gif" alt="1.gif" />
<script type="text/javascript">
<!--
document.getElementById("ck").onclick = function()
{
var img = document.getElementById("img1");
if (this.checked)
{
img.src = "2.gif";
img.alt = "2.gif";
}
else
{
img.src = "1.gif";
img.alt = "1.gif";
}
};
//-->
</script>
</body>
</html>
解决方案 »
- jquery jqchart画统计图的问题???
- 请教一下有关javascript的问题
- CSDN这么大 就没有人解决的了吗????跪求~!!!!
- 用window.attachEvent给onresize赋值和window.onresize=function(){alert("怎么回事")}
- 请问怎样在<TD></TD>里面改变SELECT的宽度和高度?
- 朋友们:请问怎样计算出春节的日期????
- 怎样关闭这个窗口啊?!
- 如何生成一个无菜单,无状态栏,无地址栏,的三无产品啊?
- 在javascript中如何把.js文件的内容写入一个变量
- 关于利用js实现txt文件上传和显示功能的疑惑
- firefox下如何刷新本页?
- 动态新闻图片 标题!
<head><title></title></head>
<body>
<script type="text/javascript">
var Check=function(){
document.getElementById("images").src="2.gif";
};
</script>
<INPUT TYPE="checkbox" NAME="ck" onclick="Check()">
<img src="1.gif" id="images"/></body>
</html>