解决方案 »
- javascript传参数问题
- 收集detectwebkit 和 detectie6的方法?
- IE不向服务器发送请求,网页空白,重新打开一个IE就没问题
- 各位,麻烦帮我看下,这个js函数什么意思,谢谢!
- 关于学习,有点迷茫,请教一下
- sourceforge上一款简便实用的html tree simplehtmltree
- 悬赏 100元 人民币 求一个 javascript 脚本的bug 的解决办法!
- ======================如何实现类似新浪网首页顶部只出现3秒就消失的大幅广告?==========================
- 大哥,大姐帮帮忙吧!关于用JavaScript取得表单数据的问题?
- 在网页上,我如何把剪贴板中的内容拷贝到我鼠标所在的位置!
- 大家好,我现在正在学网页制作,jsp,希望大家给我几点建议,谢谢!
- 收缩/展开按钮
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
.c1{
cursor:pointer;
height:20%;}
</style>
<script type="text/javascript">
function aaa(id,src,alt)
{
var obj=document.getElementById(id);
if(obj)
{
obj.src=src;
obj.alt=alt;
}
}
</script>
</head><body><table width="853" height="240" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="c1" onmouseover="aaa('img1','src1','第一个图片');">第一个数据区</td>
<td width="510" rowspan="5"><img alt="第一个图片" name="img1" width="721" height="132" id="img1"/></td>
</tr>
<tr class="c1" onmouseover="aaa('img1','src2','第2个图片');">
<td height="20">第2个数据区</td>
</tr>
<tr class="c1" onmouseover="aaa('img1','src2','第3个图片');">
<td height="20">第3个数据区</td>
</tr>
<tr class="c1" onmouseover="aaa('img1','src2','第4个图片');">
<td height="20">第4个数据区</td>
</tr>
<tr class="c1" onmouseover="aaa('img1','src2','第5个图片');">
<td height="20">第5个数据区</td>
</tr>
</table>
</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>
<script>
function changeColor(color)
{
var oElement = document.getElementById("colorBox");
oElement.style.backgroundColor = color; }
</script>
</head>
<body>
<table height="500" width="600">
<tr>
<td>
<a href="#" onclick="changeColor('#FF0000')">这是第一个颜色</a><br/>
<a href="#" onclick="changeColor('#00FF00')">这是第二个颜色</a><br/>
<a href="#" onclick="changeColor('#0000FF')">这是第三个颜色</a><br/>
</td>
<td width="300" id="colorBox" name="colorBox" ></td>
</tr>
</table>
</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>
<script>
function changeColor(color)
{
var oElement = document.getElementById("colorBox");
oElement.style.backgroundColor = color; }
</script>
</head>
<body>
<table height="500" width="600">
<tr>
<td>
<a href="#" onmouseover="changeColor('#FF0000')">这是第一个颜色</a><br/>
<a href="#" onmouseover="changeColor('#00FF00')">这是第二个颜色</a><br/>
<a href="#" onmouseover="changeColor('#0000FF')">这是第三个颜色</a><br/>
</td>
<td width="300" id="colorBox" name="colorBox" ></td>
</tr>
</table>
</body>
</html>
楼上都有答案了.