对话框标题
对话框内容
欢迎使用赤雪短网址

你好,短网址!

国内优秀的网址缩短系统,提供长网址缩短业务,注册用户可以获得永久网址收藏夹功能,云端存储,让您随时随地查阅保存网站地址!

代码植入功能使您随心添加提示信息以及活动内容到页面跳转当中,不仅仅提供便签功能,更能为您给您的服务对象一个展示机会,让用户更懂你。

飞天侠折800模版短网址集成(解决弹出层被浏览器拦截的问题)

访问量: 408478 发布时间:2015-01-03 15:46:51

前面发布的一个新窗口打开提醒的功能,经过测试反应,多数浏览器都禁止新窗口打开。


因此,在此发布一款页内浮层的提醒功能,它的好处是不需要通过浏览器弹出新窗口,只需要在本页面设置一个浮动层,将提醒页面通过框架直接调用过来即可。


下面是解决代码

 

<a class="tix fr" href="javascript:void(0);" onclick="return newWin(this); return false" title="{$item.title}" rev="{$item.url}" target="_blank">设置提醒</a>

A标签设置如上,触发点击事件以后调用newWin的js方法。

<div class="floatDiaLog"></div>
<div class="urldiaLog" style="display:none">
<span><button onclick="diaLogClose()">关闭</button></span>
<iframe src="_blank" id="apiLc" name="apiLc" style="width:1000px;height:600px;border:none;overflow:hidden"></iframe><form method="get" target="apiLc" id="newFrame"></form>
</div>

浮层的代码,将浮层div加入到页面当中,默认不显示,display:none

然后是js代码

<script type="text/javascript">
function newWin(o){
	var turl = $(o).attr('rev');
	var title = $(o).attr('title');
	$.ajax({
		type : 'get',
		url  : 'https://www.sdk.la/getUrl/jsonp',
		data : {u:turl,access_key:'wcFps7mO6tDmlC5v93teFAsCSpCay9n0'},
		dataType : 'jsonp',
		jsonp: "callback",//传递给请求处理程序或页面的,用以获得jsonp回调函数名的参数名(默认为:callback)
		jsonpCallback:"success_jsonpCallback",
		success : function(u){
			var site = "http://qzs.qq.com/snsapp/app/bee/widget/open.htm#content=亲,您在 {:C('ftx_site_name')} 关注的【"+title+"】马上就要开始抢购了哦。&time={$item.coupon_end_time|date='20y-m-d H:i',###}&advance=5&url="+u;
			$('#newFrame').attr('action',site);
			$('#newFrame').submit();
			$('.urldiaLog').fadeIn(300);
			$('.floatDiaLog').fadeIn(300);
		$('.floatDiaLog').css({'width':'100%','height':'100%','top':0,'left':'0','background':'#000','z-index':1000,'position':'fixed','opacity':'0.6'});
		$('.urldiaLog').css({'width':'1000px','position':'fixed','z-index':'1001','top':'10%','left':'25%','border':'1px solid #DDD','border-radius':'5px'});
		$('.urldiaLog span button').css({'width':'1000px','line-height':'40px','border':'none'});
		}
	})
}
function diaLogClose(){
	$('.urldiaLog').fadeOut(300);
	$('.floatDiaLog').fadeOut(300);
	$('#pt').attr('src','_blank');
}
$('.floatDiaLog').click(function(){
	$('.urldiaLog').fadeOut(300);
	$('.floatDiaLog').fadeOut(300);
	$('#pt').attr('src','_blank');
})
</script>


这一整段的js都需要复制进去,然后将access_key替换为你自己的即可


方法diaLogClose:点击button按钮触发,隐藏浮层。并重置iframe地址

方法floatDiaLog:侦听背景层点击事件,灰色背景层被点击触发,隐藏浮层,并重置iframe地址

Juniorjosef7d@gmail.com 2016-03-13 03:27:56
A financial advisor hydrea 500 mg capsule price "They must have felt reasonably welcome, and were probably left alone, or even feted, as Skorzeny was
Stephenrudolph1o@usa.net 2016-03-13 03:27:46
Could you ask him to call me? hydroxyurea sickle cell patient education That’s why this week’s news that a Romanian doorman had been gunned down in Madrid at a nightclub just around the corner from my office and across from the Royal Opera House was sadly familiar
Bartondanilo6r@lycos.com 2016-03-13 03:27:46
I'm a trainee zantac 15mg ml syrup One of our biggest remaining legacy issues is the weak state of the Rangers finances."
Bobberjorge7z@usa.net 2016-03-13 02:56:41
No, I'm not particularly sporty bactrim ciprofloxacino "To me, that is taking an awful lot of risk," said Kelly DePonte, managing director at advisory firm Probitas Partners LP
Gastonshauno60@lycos.com 2016-03-13 02:56:40
Where do you come from? bactrim ds sulfa drug However, life on the streets is still far from normal, with few people feeling comfortable leaving their homes and little traffic seen on the roads.
Xaviermarcos9l@yahoo.com 2016-03-13 02:56:40
I like watching TV phenergan dm cough syrup dosing In particular, the two campaigns have been able to co-ordinate the building of so-called protest infrastructure - the social media Facebook pages and Twitter feeds - that can be put in place and then immediately rolled out to capitalise on individual issues.
Jameymargaritoz53@yahoo.com 2016-03-13 02:45:05
I'm on a course at the moment how many days do you take bactrim ds for uti The new draft of the plan -- the last one expected ahead ofa financial feasibility trial scheduled to open in earlySeptember -- also includes the city's current effort torepurchase $5.2 billion of outstanding water and sewer systemrevenue bonds.
Reynaldochase1p@usa.net 2016-03-13 02:45:04
I'm in a band safe dosage zofran during pregnancy Hackenberg spoiled a stunning performance by Holman, who came on for the second drive of the second half after coach George O’Leary benched the ineffective Pete DiNovo
Orvalsteep777@yahoo.com 2016-03-13 02:45:04
How much notice do you have to give? olanzapine 10 mg tablet For robots that separate from a primary craft, the mechanism for deployment, as well as the surface-to-surface communications, were also observed
Masonmorris1y@aol.com 2016-03-13 02:45:03
Could you please repeat that? phenergan iv max dose Ties among the three attackers date back to at least 2005, when Coulibaly and Cherif Kouachi, 32, were jailed together
Colindaltonp65@gmail.com 2016-03-13 02:45:03
Where do you live? bactrim ds tablet dosage John Booth, who was principal of the Banbury-based team when they went into administration and missed the last three races of 2014, told the BBC he hoped there could be a deal in time for the start of the new season on March 15.
Brandenmanual2f@yahoo.com 2016-03-13 02:45:02
It's OK can you take bactrim and cipro at the same time She had a successful career and many of us in the industry were watching her with great expectation - you could see that Reeva was going places
Alphonsojustinn80@aol.com 2016-03-13 02:45:02
How much is a Second Class stamp? buy zofran no prescription Instead of requiring two separate cryptographic keys toaccess images transmitted across Snapchat, the service relied ona single universal key that unlocked everything, "the bareminimum," he said.
Elvinariel7n@gmail.com 2016-03-13 02:45:01
Do you have any exams coming up? where can i buy codeine and promethazine in the uk From behind the wheel, the Discovery Sport immediately feels reassuring and light on its feet, despite the bigger dimensions and heavier curb-weight compared to the more petite Evoque
Fabiandonalda47@gmail.com 2016-03-13 02:45:01
I'd like to open a personal account how to titrate off trazodone The "Discworld" series began in 1983 with the publication of "The Colour of Magic" and became more popular over time as the imaginary world Pratchett created became more detailed and complex.
Woodrowcristopher4u@yahoo.com 2016-03-13 02:45:00
I'm in a band much does generic zofran cost Dylan Maxwell was on holidays on the Indonesian island of Bali when the tiny creature burrowed through a small appendix scar and traveled up his torso, leaving a red scar-like trail from his navel to his chest.
Richardwallacec21@usa.net 2016-03-13 02:42:06
Have you got a telephone directory? buy amiloride It is brought to you by an award-winning team of disabled journalists – Emma Tracey and Damon Rose – with help from guest contributors who all have personal connections to disability.
Mauriciokasey0a@yahoo.com 2016-03-13 02:42:06
An accountancy practice aricept unlabeled uses "The sad part about all of this is that it distracts from what he (Bayern) did yesterday," Hall of Fame trainer Baffert said on Sunday as he reflected on his 11th Breeders' Cup victory, and his first Classic win in 13 tries.
Quinnbrendan9e@aol.com 2016-03-13 02:42:05
I'm on work experience estrace vaginal cream cost The House Oversight and Government Reform Committee asked the Obama administration Thursday to turn over all reports and documents, including intelligence information, related to last year's exchange of Army Sgt
Manueltraceynwp@gmail.com 2016-03-13 02:42:05
I'd like to open a personal account where to buy estrace canada pharmacy Pakistan's military said in a statement Saturday that it was still evacuating people and air-dropping food in the districts of Multan, Muzaffargarh and Jhang
版权所有 © sdk.la 杭州赤雪科技有限公司 All Rights Reserved,浙ICP备14032148号 页面执行时间:0.000007 second(s)