Tag: location href

按钮onClick事件和Href-Location

我在本讨论中使用了“Chrules”给出的解决方案: 没有href的按钮,onclick等 像这样 : Click Me!! …… $(“#clickable”).click(function(){ // Send user to this link insertRecord(); //SQLite Code location.href = “game.html”; // location.href = “http://www.takemehere.com”; }); 所以,当我使用location.href时就像他推了它一样(=“ http://www.takemehere.com ”;)insertRecord()方法成功完成(该对象被添加到数据库中) 但是当我使用location.href =“game.html”时; game.html页面打开但是insertRecord()方法没有完成我试图把game.html的完整路径,但同样的问题仍然存在你有什么想法吗? 提前谢谢你

FancyBox从iframe内关闭并将父页面转到链接

我发现将以下函数应用于关闭onclose工作以从iFrame中关闭Fancybox: parent.$.fancybox.close(); 我想更进一步,让链接将父页面转到新的URL。 我尝试了以下但它不起作用: Close and go to page 使用a href不起作用,因为onclose优先。