js如何自动识别当前页图片地址并形成链接可点击弹出新窗口
actions:function(){var$this=this;if(elements.length<2){$("#swipebox-prev,#swipebox-ne...
actions: function() {
var $this = this;
if (elements.length < 2) {
$("#swipebox-prev, #swipebox-next").hide()
} else {
$("#swipebox-prev").bind("click touchend",
function(e) {
e.preventDefault();
e.stopPropagation();
$this.getPrev();
$this.setTimeout()
});
$("#swipebox-next").bind("click touchend",
function(e) {
e.preventDefault();
e.stopPropagation();
$this.getNext();
$this.setTimeout()
})
}
$("#swipebox-imgurl").bind("click touchend",
function(e) {
window.open("此处如何自动识别并添加当前页图片地址", "_blank");
return false;
})
$("#swipebox-close").bind("click touchend",
function(e) {
$this.closeSlide()
})
},
图片页面
<div class="swipeboxEx">
<!--{loop $photos $k $v}-->
<a href="{$v['path']}" title="{$album_info['name']}<br>{$v['name']}" class="swipebox"><img alt="{$album_info['name']}<br>{$v['name']}" src="{$v['thumb']}"/></a>
<!--{/loop}-->
</div> 展开
var $this = this;
if (elements.length < 2) {
$("#swipebox-prev, #swipebox-next").hide()
} else {
$("#swipebox-prev").bind("click touchend",
function(e) {
e.preventDefault();
e.stopPropagation();
$this.getPrev();
$this.setTimeout()
});
$("#swipebox-next").bind("click touchend",
function(e) {
e.preventDefault();
e.stopPropagation();
$this.getNext();
$this.setTimeout()
})
}
$("#swipebox-imgurl").bind("click touchend",
function(e) {
window.open("此处如何自动识别并添加当前页图片地址", "_blank");
return false;
})
$("#swipebox-close").bind("click touchend",
function(e) {
$this.closeSlide()
})
},
图片页面
<div class="swipeboxEx">
<!--{loop $photos $k $v}-->
<a href="{$v['path']}" title="{$album_info['name']}<br>{$v['name']}" class="swipebox"><img alt="{$album_info['name']}<br>{$v['name']}" src="{$v['thumb']}"/></a>
<!--{/loop}-->
</div> 展开
1个回答
2016-05-20 · 做真实的自己 用良心做教育
千锋教育
千锋教育专注HTML5大前端、JavaEE、Python、人工智能、UI&UE、云计算、全栈软件测试、大数据、物联网+嵌入式、Unity游戏开发、网络安全、互联网营销、Go语言等培训教育。
向TA提问
关注
展开全部
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <!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=gb2312" /> <title>原始窗口</title><style type="text/css"> <!-- body,td,th { font-size: 12px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } #lockWindow { position:absolute; text-align:center; left:0px; top:0px; width:0; height:0; z-index:70; background-color: #CCCCCC; filter:alpha(opacity=60); display:none; } #MsgWindow { position:absolute; text-align:center; left:0px; top:0px; width:0; height:0; z-index:100; display:none; } --> </style> <script language="javascript"> function lockWindow(){ window.open("b.asp","face","width=400,height=400,scrollbars=1") var lockDiv = document.getElementById("lockWindow"); var MsgWindow = document.getElementById("MsgWindow"); document.title="窗口已锁定"; lockDiv.style.width=document.body.scrollWidth; lockDiv.style.height=document.body.scrollHeight; lockDiv.style.display="block"; MsgWindow.style.top=document.body.clientHeight/4; MsgWindow.style.left=document.body.clientWidth/3.5; MsgWindow.style.display="block"; } function unlockWindow(){ var lockDiv = document.getElementById("lockWindow"); var MsgWindow = document.getElementById("MsgWindow"); document.title="窗口已解除锁定"; lockDiv.style.width=0; lockDiv.style.height=0; lockDiv.style.display="none"; MsgWindow.style.display="none"; } </script> </head> <body> <div align="center"> <div id="lockWindow"> </div> <div id="MsgWindow"> <table width="403" border="0" cellspacing="1" bgcolor="#3399FF"> <tr> <td width="399" height="25" align="center" bgcolor="#3399FF">点击按钮解除窗口锁定</td> </tr> <tr> <td height="100" bgcolor="#FFFFFF">当系统开始发布任务的时候,弹出一个窗口锁定当前的页面,提示“正在发布...”并显示发布的进度。当点取消或者发布任务完毕的时候,解除锁定然后跳转到指定页面,如何实现这种效果?</td> </tr> <tr> <td align="center" bgcolor="#FFFFFF"><input type="button" name="Submit" value="解除锁定" onclick="unlockWindow()"></td> </tr> </table> </div> <p></p> <form id="form1" name="form1" method="post" action=""> <a href="#?locak=1" onclick="lockWindow()">aaaaaaa</a> </form> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> </body> </html>
追问
答非所问
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询