展开全部
<!DOCTYPE html>
<html>
<body>
<script>
function changeImage()
{
element=document.getElementById('myimage')
if (element.src.match("95eef01f3a292df55e824e1dbe315c6034a87371"))
{
element.src="https://gss0.baidu.com/9vo3dSag_xI4khGko9WTAnF6hhy/image/pic/item/342ac65c1038534342a2153f9113b07eca8088bb.jpg";
}
else
{
element.src="https://gss0.baidu.com/-fo3dSag_xI4khGko9WTAnF6hhy/image/pic/item/95eef01f3a292df55e824e1dbe315c6034a87371.jpg";
}
}
</script>
<img id="myimage" onclick="changeImage()"
src="https://gss0.baidu.com/9vo3dSag_xI4khGko9WTAnF6hhy/image/pic/item/342ac65c1038534342a2153f9113b07eca8088bb.jpg" width="200" height="300">
<p>点图,就可两个图切换</p>
</body>
</html>
<html>
<body>
<script>
function changeImage()
{
element=document.getElementById('myimage')
if (element.src.match("95eef01f3a292df55e824e1dbe315c6034a87371"))
{
element.src="https://gss0.baidu.com/9vo3dSag_xI4khGko9WTAnF6hhy/image/pic/item/342ac65c1038534342a2153f9113b07eca8088bb.jpg";
}
else
{
element.src="https://gss0.baidu.com/-fo3dSag_xI4khGko9WTAnF6hhy/image/pic/item/95eef01f3a292df55e824e1dbe315c6034a87371.jpg";
}
}
</script>
<img id="myimage" onclick="changeImage()"
src="https://gss0.baidu.com/9vo3dSag_xI4khGko9WTAnF6hhy/image/pic/item/342ac65c1038534342a2153f9113b07eca8088bb.jpg" width="200" height="300">
<p>点图,就可两个图切换</p>
</body>
</html>
展开全部
不知道你说的表格是指边框否?
<script type="text/javascript">
function check(scrImg){
if (scrImg.src.indexOf("logo.gif")>0){
srcImg.src = "main3.gif"
srcImg.border = 0
}else{
srcImg.src = "logo.gif"
scrImg.border = 1
}
}
</script>
<img src="logo.gif" id="srcImg" border=1 onclick= "check(this)" ></img>
表格:
<script type="text/javascript">
function check(scrImg){
if (scrImg.src.indexOf("logo.gif")>0){
srcImg.src = "main3.gif"
document.getElementById("tab1").style.display="none"
}else{
srcImg.src = "logo.gif"
document.getElementById("tab1").style.display=""
}
}
</script>
<img src="logo.gif" id="srcImg" border=0 onclick= "check(this)" ></img>
<table id="tab1" border=1><tr><td>test</td></tr></table>
以上回答你满意么?
<script type="text/javascript">
function check(scrImg){
if (scrImg.src.indexOf("logo.gif")>0){
srcImg.src = "main3.gif"
srcImg.border = 0
}else{
srcImg.src = "logo.gif"
scrImg.border = 1
}
}
</script>
<img src="logo.gif" id="srcImg" border=1 onclick= "check(this)" ></img>
表格:
<script type="text/javascript">
function check(scrImg){
if (scrImg.src.indexOf("logo.gif")>0){
srcImg.src = "main3.gif"
document.getElementById("tab1").style.display="none"
}else{
srcImg.src = "logo.gif"
document.getElementById("tab1").style.display=""
}
}
</script>
<img src="logo.gif" id="srcImg" border=0 onclick= "check(this)" ></img>
<table id="tab1" border=1><tr><td>test</td></tr></table>
以上回答你满意么?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询