我想只运行一次这个javascript函数(第一页加载)。可能吗?谢谢
<div id="pag">
<script type="text/javascript">
var framekiller = true;
window.onbeforeunload = function () {
if (framekiller) {
return "Click on stay on this page";
}
};
</script>
<iframe scr="http://www.example.com/page-with-javascript-framebuster.html"></iframe>
</div>