차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
마지막 판양쪽 다음 판
tech:javascript_onclick [2015/02/04 11:10] V_Ltech:버튼이나_하이퍼링크로_자바스크립트_실행시키는_방법 [2015/05/27 03:18] V_L
줄 1: 줄 1:
-====== Javascript Onclick ======+======버튼이나 하이퍼링크로 자바스크립트 실행시키는 방법 (Javascript Onclick====== 
 + 
 +버튼이나 하이퍼링크로 자바스크립트 실행시키는 방법...
  
 ====나쁨==== ====나쁨====
줄 23: 줄 25:
 Why better? because return false will prevent browser from following the link Why better? because return false will prevent browser from following the link
  
-best:+====제일 좋음====
  
 Use jQuery or other similar framework to attach onclick handler by element's ID. Use jQuery or other similar framework to attach onclick handler by element's ID.
  
-$('#myLink').click(function(){ MyFunction(); return false; });+    jQuery('#myLink').click(function(){ MyFunction(); return false; }); 
  
-{{tag>javascript onclick}}+[출처](http://stackoverflow.com/questions/1070760/javascript-function-in-href-vs-onclick) 
 +{{tag>javascript onclick 버튼  하이퍼링크 로 자바스크립트 실행  방법}}

tech/버튼이나_하이퍼링크로_자바스크립트_실행시키는_방법.txt · 마지막으로 수정됨: 2016/07/12 09:26 저자 127.0.0.1
CC Attribution-Noncommercial-Share Alike 4.0 International 별도로 명시하지 않을 경우, 이 위키의 내용은 다음 라이선스에 따라 사용할 수 있습니다: CC Attribution-Noncommercial-Share Alike 4.0 International