"JavaScript 버튼 비활성화"의 두 판 사이의 차이

6번째 줄: 6번째 줄:
==예제 1: HTML==
==예제 1: HTML==
*http://jmnote.com/html5/button-disabled.php
*http://jmnote.com/html5/button-disabled.php
<source lang='html5'>
<button onclick="alert('Hello');">Say Hello</button>
<button onclick="alert('World');" disabled='disabled'>Say World</button>
</source>
==예제 2: JavaScript==
*http://jmnote.com/js/button-disabled.php
<source lang='html5'>
<source lang='html5'>
<button onclick="alert('Hello');">Say Hello</button>
<button onclick="alert('Hello');">Say Hello</button>
12번째 줄: 19번째 줄:


==예제 2: jQuery==
==예제 2: jQuery==
*http://jmnote.com/html5/button-disabled.php
*http://jmnote.com/jq/button-disabled.php
<source lang='html5'>
<source lang='html5'>
<button onclick="alert('Hello');">Say Hello</button>
<button onclick="alert('Hello');">Say Hello</button>
<button onclick="alert('World');" disabled='disabled'>Say World</button>>
<button onclick="alert('World');" disabled='disabled'>Say World</button>
</source>
</source>



2014년 7월 15일 (화) 22:31 판

1 개요

HTML button disabled
HTML 버튼 비활성화
  • 버튼이 비활성화되면 onclick도 작동하지 않게 된다.

2 예제 1: HTML

<button onclick="alert('Hello');">Say Hello</button>
<button onclick="alert('World');" disabled='disabled'>Say World</button>

3 예제 2: JavaScript

<button onclick="alert('Hello');">Say Hello</button>
<button onclick="alert('World');" disabled='disabled'>Say World</button>

4 예제 2: jQuery

<button onclick="alert('Hello');">Say Hello</button>
<button onclick="alert('World');" disabled='disabled'>Say World</button>

5 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}