How To Add Functions To Javascript onload Over Third Party Scripts; Playing Nice JavaScriptの関数を追加する方法をサードパーティ製のスクリプトのonload以上;演奏ニース
As a javascript developer using onload often you will find that other script authors too love to use onload. JavaScriptの開発者としてのonload頻繁に使用して他のスクリプトの作者であることに気づいても愛のonloadを使用しています。 Unfortunately onload accepts a function name and your reassigning will prevent others from using onload.残念ながらのonloadには、関数名として再使用して、他のユーザーのonloadを防ぐ。 Here is a script which allows you to use onload even when others have used it and without breaking their script.ここで使用するには、スクリプトを使用して他人が使用されるときのonloadもなく破壊し、そのスクリプトです。
The key idea is that you should be able to stack your function(s) above / below existing function call.アイデアの鍵は、スタックしてできるようにする必要があります。関数(劇団)の上/下に、既存の関数呼び出しです。 Let’s look at the sample code below:このサンプルコードを見てみましょうください:
I think I have well commented the code to make the script self-explanatory, but feel to ask questions.と思うのコードが良いコメントが自明のスクリプトを作るが、感じるに質問します。 The code has been tested on Firefox, Internet Explorer and Opera. Firefox用のコードでテストされてきた、インターネットエクスプローラやオペラです。
Filed under提出されて Browserブラウザ , 、 Firefox Firefoxの , 、 Headline Newsニュースの見出し , 、 How Toどのように , 、 Internet Explorerインターネットエクスプローラ , 、 Javascript JavaScriptの , 、 Programmingプログラミング , 、 Webウェブ , 、 Web 2.0ウェブ2.0 , 、 Web Services Webサービス | |
| |
RSS 2.0 RSS 2.0を | |
Trackbackトラックバック this Article |この記事|
Email this Article電子メールこの記事
You may also like to readを読むようにすることも可能 |





February 7th, 2007 at 10:34 pm 2007年2月7日10:34 pmの
Where is the sample code?このサンプルコードはどこにありますか?
February 8th, 2007 at 1:08 am 2007年2月8日1:08アム
hi there,やあ、
I don’t see any code — I use firefox 1.5.x on windows.私任意のコードが表示されない-F irefoxの1 .5を使用します。
Thank you,ありがとうございました、
BR, br 、
~A 〜する
February 8th, 2007 at 3:09 am 2007年2月8日の午前9:09
Thanks for the catch.キャッチてくれてありがとう。 I forgot to escape the <’s and >’s私を忘れてエスケープする< " sと> "秒
April 30th, 2007 at 5:44 pm 2007年4月30日は午後5時44分
Thanks for the script!スクリプトてくれてありがとう!
October 26th, 2007 at 6:30 am 2007年10月26日午前6:30
Great idea.素晴らしいアイデアです。 I created a function, addEventHandler, that simplifies adding this technique to new Javascripts.私作成する機能、 addeventhandler 、この手法を新たに追加するにJavaScriptを簡素化します。
Thanks for addressing this issue.この問題を解決するアドレッシングいただきありがとうございます。 It was a recent concern of mine.それは、鉱山の最近の関心事である。