最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

open 動態(tài)修改img的onclick事件示例代碼

 更新時(shí)間:2013年11月13日 17:27:16   作者:  
動態(tài)修改img的onclick事件,使用open也可輕松做到,下面有個(gè)不錯(cuò)的示例,需要的朋友可以參考下
復(fù)制代碼 代碼如下:

var imgsrc = document.getElementById("imgsrc").getElementsByTagName('img');
imgsrc[0].style.cursor="hand";
imgsrc[0].onclick = new Function( "openArticle('/RssCommServlet?catalogid=29')");
imgsrc[1].style.cursor="hand";
imgsrc[1].onclick = new Function( "openArticle('/RssCommServlet?catalogid=30')");
imgsrc[2].style.cursor="hand";
imgsrc[2].onclick = new Function( "openArticle('/RssCommServlet?catalogid=31')");

<!--
function openArticle(url)
{
if(url=='')
return;
var option = "";
window.open(url,'',option);
}
var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
function getRef(id)
{
if (isDOM) return document.getElementById(id);
if (isIE4) return document.all[id];
if (isNS4) return document.layers[id];
}
function openNotice(url,winOption)
{
if(url=='')
return;
window.open(url,'',winOption);
}
function openWin(url,left,top,width,height)
{
if(url=='')
return;
var winOption = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+width+",height="+height+",left="+left+",top="+top;
window.open(url,'',winOption);
return;
}
function openWin(url,left,top,width,height,resizable)
{
if(url=='')
return;
var winOption = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable="+resizable+",width="+width+",height="+height+",left="+left+",top="+top;
window.open(url,'',winOption);
return;
}
//-->

相關(guān)文章

最新評論

中宁县| 哈巴河县| 仁布县| 偃师市| 新丰县| 忻城县| 洪雅县| 鹿泉市| 钟山县| 逊克县| 寻甸| 丰都县| 晋中市| 阳信县| 庄浪县| 武强县| 南乐县| 永城市| 忻城县| 黄冈市| 西平县| 伊宁市| 永登县| 龙岩市| 博罗县| 南雄市| 泗阳县| 利辛县| 临洮县| 九龙坡区| 哈巴河县| 海城市| 同德县| 孝义市| 梁河县| 定陶县| 阿克苏市| 天镇县| 双柏县| 郸城县| 襄城县|