English 中文(简体)
必要时调动职能
原标题:Calling functions when needed
最佳回答
问题回答

是的,你应尽可能在<条码>文件.ready外界定物体、功能等。 一些发展中国家将绝对地界定 wrap户以外的一切,然后才在per伯内称为“<>init()”功能,以装载其他一切。 我就是这样一个dev子。

就象同仁一样,这的确是装上合成物的,但是,由于在页数上做的工作要少得多,所以它加速了你的网页。

一般来说,如果你不使用像要求那样的文字装载器, 共同提交文件或经批准,在贵机构结束时,把你所有的文字参考资料——或至少不需要立即操作的文字——放在前面,这样一页就能够在资源上运行,直到页页后。

I would load all additional resources using RequireJS ( http://requirejs.org/ ) or similar library.

Put everything that you don t need immediately to separate script and load it after main content is loaded.





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签