公共频道18点新闻今天:ASP实现图象预览功能

来源:百度文库 编辑:中科新闻网 时间:2024/05/05 02:25:30
我想要实现与以下网页里类似的功能http://www.sotuan.com/product/product_search.aspx?LocalID=18&ThirdSortID=-1&KeyWord=香港
就是在鼠标移到图片上的时候可以弹出原始比例大小的图片预览,但是那个是用.net做的,我不会,请问能用ASP实现类似的功能吗?
function showbigpic(o,picname)
{
document.getElementById("Panel1").style.visibility='visible';
oAjax = new ActiveXObject("Microsoft.XMLHTTP");
oAjax.open("POST","../include/showpic.aspx?picname="+picname,true);
oAjax.onreadystatechange=function()
{
if(oAjax.readyState ==4)
{document.getElementById("Panel1").innerHTML =oAjax.responseText;}
}
oAjax.send();
var w = getx(o); //w
var h = gety(o); //h
document.getElementById("Panel1").style.top = h;
document.getElementById("Panel1").style.left = w+160;

}
function hidenpic()
{
document.getElementById("Panel1").style.visibility='hidden';
}
</script>

<IMG height=100 width=150 onMouseOut="(hidenpic())" onMouseOver="showbigpic

(this,'/UpLoad/TravelingLineImage/Y2006417174746JAPAN-国立公园02.jpg')"

src='/UpLoad/TravelingLineImage/Y2006417174746JAPAN-国立公园02.jpg'/>

那个和是否什么后台没有关系,是用js脚本实现的
你可以复制他的网页看一下js脚本,提取出来

该死的补充1000字限制,补充在这里:
function showbigpic(o,picname)
{
document.getElementById("Panel1").style.visibility='visible';
oAjax = new ActiveXObject("Microsoft.XMLHTTP");
oAjax.open("POST","../include/showpic.aspx?picname="+picname,true);
oAjax.onreadystatechange=function()
{
if(oAjax.readyState ==4)
{document.getElementById("Panel1").innerHTML =oAjax.responseText;}
}
oAjax.send();
var w = getx(o); //w
var h = gety(o); //h
document.getElementById("Panel1").style.top = h;
document.getElementById("Panel1").style.left = w+160;

}
function hidenpic()
{
document.getElementById("Panel1").style.visibility='hidden';
}
</script>

<IMG height=100 width=150 onMouseOut="(hidenpic())" onMouseOver="showbigpic(this,'/UpLoad/TravelingLineImage/Y2006417174746JAPAN-国立公园02.jpg')" src='/UpLoad/TravelingLineImage/Y2006417174746JAPAN-国立公园02.jpg'/>

就是这一段:oAjax.open("POST","../include/showpic.aspx?picname="+picname,true);
虽然不知道具体是什么意思,但是明显是与.net有关,我不会那个,没办法处理啊