请问在asp页面中如何更换图片
请问在asp页面中如何更换图片,比如我图片A现在在页面显示,我想点一个按钮让他变成图片B请问怎么做,谢谢!...
请问在asp页面中如何更换图片,比如我图片A现在在页面显示,我想点一个按钮让他变成图片B请问怎么做,谢谢!
展开
1个回答
展开全部
<!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=utf-8" />
<title>无标题文档</title>
<link href="css/changePic.css" type="text/css" rel="stylesheet" />
</head>
<script language="javascript">
function changePic(xx){
if(xx="aa"){
document.getElementById("bb").style.display="none";
document.getElementById("aa").style.display="block";
}
else{
document.getElementById("aa").style.display="none";
document.getElementById("bb").style.display="block";
}
}
</script>
<style type="text/css">
body{margin:0px; padding:0px; text-align:center; font-size:12px; color:#339900;}
#pic,#pic div{width:200px; height:200px; margin:0px auto 0px auto; overflow:hidden;}
#aa{display:none;}
span{cursor:pointer;}
</style>
<body>
<div id="pic">
<div id="aa">aaaaa</div>
<div id="bb">bbbbb</div>
</div><br />
<span onclick="changePic('aa')">更换图片</span>b
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/changePic.css" type="text/css" rel="stylesheet" />
</head>
<script language="javascript">
function changePic(xx){
if(xx="aa"){
document.getElementById("bb").style.display="none";
document.getElementById("aa").style.display="block";
}
else{
document.getElementById("aa").style.display="none";
document.getElementById("bb").style.display="block";
}
}
</script>
<style type="text/css">
body{margin:0px; padding:0px; text-align:center; font-size:12px; color:#339900;}
#pic,#pic div{width:200px; height:200px; margin:0px auto 0px auto; overflow:hidden;}
#aa{display:none;}
span{cursor:pointer;}
</style>
<body>
<div id="pic">
<div id="aa">aaaaa</div>
<div id="bb">bbbbb</div>
</div><br />
<span onclick="changePic('aa')">更换图片</span>b
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询