jquery 사용자 정의 방법 호출 예시

1080 단어 JavaScripthtmljquery
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
  <script type="text/javascript" src="jquery-1.4.2.min.js"></script>
  <script type="text/javascript" src="2.js"></script>
  <script type="text/javascript">
	 $(function(){
	    $("#a").closeDlg();
	 })
  </script>
 </HEAD>

 <BODY>
   <div id="a"></div>
 </BODY>
</HTML>

 
 
jQuery.fn.extend({
        closeDlg: function(element){alert(element);}
      })

좋은 웹페이지 즐겨찾기