这个问题的本质:是IE6下相对路径实现有问题。解决这个问题:利用html的base标签 如你的html>head下加此标签 <base id="bs" href="http://localhost:8080/yourSubjectName"/><!-- 这个标签的意义自己查下html文档 --> function show_img(targetid,img){
//取得base的标签的值 var baseUrl = document.getElementById("bs");// var target=document.getElementById(targetid); if (target.style.display=="block"){ target.style.display="none"; document.getElementById(img).src=baseUrl.href + "/img_new/b_down.gif";
http://www.gotoqq.com.cn/ads/lastest/html/manege000.html
都改成绝对地址了 !-_-"
document.getElementById(img).src="http://10.0.2.5:8026/img_new/b_down.gif";
还是分别安装在两台不同的机器上?
如你的html>head下加此标签
<base id="bs" href="http://localhost:8080/yourSubjectName"/><!-- 这个标签的意义自己查下html文档 -->
function show_img(targetid,img){
//取得base的标签的值
var baseUrl = document.getElementById("bs");// var target=document.getElementById(targetid);
if (target.style.display=="block"){
target.style.display="none";
document.getElementById(img).src=baseUrl.href + "/img_new/b_down.gif";
} else {
target.style.display="block";
document.getElementById(img).src=baseUrl.href + "/img_new/b_up.gif";
}
}这种方式解决了IE6下的bug,当然最好不能用绝对路径。
document.getElementById(img).src="http://10.0.2.5:8026/img_new/b_down.gif";