87,910
社区成员
发帖
与我相关
我的任务
分享
<script language="JavaScript">
<!--
clckimgd = 0;
function clckimg(id) {
clckimgd++;
if(clckimgd > 1)
{
alert('请不要重复点击,谢谢!');
return false;
}
window.open ('2.htm','上传图片',"width=" +370+ ",height=" + 200+ ",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no");
}
-->
</script>
<a href="#" onclick="clckimg('<%=rs('id')%>')"> 链接一</a>
<a href="#" onclick="clckimg('<%=rs('id')%>')"> 链接二</a>
<!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>
</head>
<body>
<a href="http://www.baidu.com" onclick="clckimg(this)">ggggg</a>
<a href="http://www.sina.com.cn" onclick="clckimg(this)">ffffff</a>
<script type="text/javascript">
var linkList = {};
function clckimg(obj) {
if(linkList[obj.href] == 1) {
obj.href = 'javascript:void(0)';
obj.removeAttribute('target');
linkList[obj.href] = 2;
}else if(linkList[obj.href] == 2) {
return false;
} else {
linkList[obj.href] = 1;
obj.setAttribute('target', '_blank');
}
}
</script>
</body>
</html>
<script language="JavaScript">
<!--
var obj = new Object();
function clckimg(id) {
if(eval("obj.id"+id))
{
alert('请不要重复点击,谢谢!');
return false;
}
eval("obj.id"+id+"=1;")
window.open ('2.htm','上传图片',"width=" +370+ ",height=" + 200+ ",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no");
}
-->
</script>
<a href="#" onclick="clckimg('<%=rs('id')%>')"> 链接一</a>
<a href="#" onclick="clckimg('<%=rs('id')%>')"> 链接二</a>