关闭图像 close2.jpg,close1.jpg 在 Firefox 中不起作用,而在 Google Chrome 和 IE 中运行。URL 是 www.srfads.com --> 主页--> 在印度查找广告--> 点击更改
我的 js 文件是
enter code here
function show(id,x,y)
{
var element = document.getElementById(id);
//var exit_element = document.getElementById(exit_id);
var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth;
if(width == 0)
{
width = 1280;
}
var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight;
if(height == 0)
{
height = 786;
}
element.style.position = "absolute";
element.style.display = "block";
element.style.left = (document.documentElement.scrollLeft + (width - element.clientWidth)/2 + x) + 'px';
element.style.top = (document.documentElement.scrollTop + (height - element.clientHeight)/2 + y) + 'px';
var xmlhttpobject = new XMLHttpRequest();
xmlhttpobject.open("GET","sct.php",true);
xmlhttpobject.send();
xmlhttpobject.onreadystatechange = function ()
{
if(xmlhttpobject.readyState == 4 && xmlhttpobject.status == 200)
{
document.getElementById('shct').innerHTML = xmlhttpobject.responseText;
}
}
}
我的 php 页面是
改变
<div id="showcity" style="display:none;border:8px solid rgb(120,120,120); border-radius:8px;">
<table style="background:white;">
<tr>
<td style="text-align: left;padding: 10px; width:300px; height:20px;border-bottom:1px solid;">Select a City</td>
<td style="text-align: right;padding: 10px; width:300px; height:20px;border-bottom:1px solid;">
<div id="clsdiv1" style="display: block;"><img src="img\close2.jpg" id="close1" onmouseover="show1()" /></div>
<div id="clsdiv2" style="display: none;"><img src="img\close1.jpg" id="close2" onmouseout="show2()" onclick="popupexit('showcity')" /></div>
</td>
</tr>
<tr>
<td colspan="2" style="height:200px;">
<div id="shct"></div>
</td>
</tr>
</table>
</div>