How To Add Functions To Javascript onload Over Third Party Scripts; Playing Nice 자바 스크립트 기능을 추가하는 방법을 제 3 자 이상 스크립트를 onload; 연주 니스
As a javascript developer using onload often you will find that other script authors too love to use onload. 자바 스크립트 개발자로서 다른 스크립트를 사용하여 저자 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 자바 스크립트 , Programming 프로그래밍 , Web 웹 , Web 2.0 웹 2.0 , Web Services 웹 서비스 | |
| |
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분
Where is the sample code? 샘플 코드는 어디에?
February 8th, 2007 at 1:08 am 2007년 2월 8일에서 오전 1시 8분
hi there, 안녕하세요,
I don’t see any code — I use firefox 1.5.x on windows. 모든 코드를 표시되지 않습니다 - 전 firefox 1.5을 사용 windows.
Thank you, 감사합니다,
BR, 브롬,
~A ~ a
February 8th, 2007 at 3:09 am 2007년 2월 8일에서 오전 3시 9분
Thanks for the catch. 캐치 주셔서 감사합니다. I forgot to escape the <’s and >’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, 그것을 단순화하는 데이 기술을 새로 추가할 수없습니다.
Thanks for addressing this issue. 이 문제를 해결 주셔서 감사합니다. It was a recent concern of mine. 그것은 최근의 우려 광산합니다.