[英]how to call function on new created _blank tab
How can I copy page to new tab, and call .ready(function(){});
如何将页面复制到新标签页,并调用
.ready(function(){});
on new created tab? 在新创建的标签上?
$("#copyTab").live("click", function () {
var url = window.location.pathname;
window.open(url, '_blank');
});
You will need to add scripting to the new page. 您将需要向新页面添加脚本。 So you will have to be in control of the page that you are opening.
因此,您将必须控制要打开的页面。
Add this to the new page before the </body>
tag: 将此标签添加到
</body>
标记之前的新页面中:
<script type="text/javascript">
$(document).ready(function () {
// code here
});
</script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.