包括js超时 - 需要帮助:) [英] include js timeout - help needed :)
问题描述
你好,我是javascript的noob,所以在这里跳来寻找帮助...
我相信我需要的是简单的,还是避风港''找到任何解决方案。
我有一个网站提供广告,以及来自多个系统的链接,它们的格式总是如下:
< script language = javascript src =" http://something.com/script.php?id = 26758765">< / script
这很好,不过我想为此建立一个超时,例如,如果在2秒内没有提供something.com/script.php?id=26758765,页面仍会加载而不是试图永远加载该javascript。 br />
我该怎么办?
请发布一些示例代码。我是noob ...对不起。
Hi there, I''m a noob to javascript, so was hopping to find some help here...
I believe that what I need is simple, still haven''t found any solution.
I have a website serving ads, and links from several systems, and they always come in a format like:
<script language=javascript src="http://something.com/script.php?id=26758765"></script
This is fine, however I would like to establish a time-out for this, like for instance, if something.com/script.php?id=26758765 is not available in 2 seconds, the page would still load instead of trying to load that javascript forever.
What can I do?
Please post some example code. I''m a noob... sorry.
推荐答案
有点明白,但是英文不好,不知道怎么帮你!
不知道你是不是用document.write()或者document.writeln()。这两个必须在页面加载前用,要不然你的页面将会被打印出来的值覆盖!
有点明白,但是英文不好,不知道怎么帮你!
不知道你是不是用document.write()或者document.writeln() . 这两者必须在页面加载前用,要不然你的页面将会被打印出来的值覆盖!
你好,我是javascript的小伙子,所以在这里找到一些帮助...
我相信我需要的很简单,仍然没有找到任何解决方案。
我有一个网站提供广告,以及来自多个系统的链接,它们的格式总是如下:
< script language = javascript src =" http://something.com/script.php?id = 26758765">< / script
这很好,但我想建立一个超时,例如,如果在2秒内没有提供something.com/script.php?id=26758765,页面仍会加载,而不是试图永远加载该javascript。
>
我该怎么办?
请发布一些示例代码。我是个菜鸟......对不起。
Hi there, I''m a noob to javascript, so was hopping to find some help here...
I believe that what I need is simple, still haven''t found any solution.
I have a website serving ads, and links from several systems, and they always come in a format like:
<script language=javascript src="http://something.com/script.php?id=26758765"></script
This is fine, however I would like to establish a time-out for this, like for instance, if something.com/script.php?id=26758765 is not available in 2 seconds, the page would still load instead of trying to load that javascript forever.
What can I do?
Please post some example code. I''m a noob... sorry.
欢迎使用脚本。
PHP是否生成javascript代码。
如果它是静态的,为什么不在PHP页面中包含javascript?
Welcome to The Scripts.
Is the PHP generating javascript code.
If it''s static, why not include the javascript in your PHP page?
有点明白,但是英文不好,不知道怎么帮你!
不知道你是不是用document.write()或者document.writeln()。这两者必须在页面加载前用,要不然你的页面将会被打印出来的值覆盖!
有点明白,但是英文不好,不知道怎么帮你!
不知道你是不是用document.write()或者document.writeln() . 这两者必须在页面加载前用,要不然你的页面将会被打印出来的值覆盖!
翻译请!!
Translation please!!
这篇关于包括js超时 - 需要帮助:)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!