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

잔글 (Jmnote 사용자가 CSS 버튼 비활성화 문서를 HTML 버튼 비활성화 문서로 옮겼습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;CSS button disabled
;HTML button disabled
;CSS 버튼 비활성화
;HTML 버튼 비활성화
* 버튼이 비활성화되면 [[onclick]]도 작동하지 않게 된다.
* 버튼이 비활성화되면 [[onclick]]도 작동하지 않게 된다.


==예제 1==
==예제 1: HTML==
*http://jmnote.com/css/button-disabled.php
*http://jmnote.com/html5/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>


==예제 2==
==예제 2: jQuery==
*http://jmnote.com/html5/button-disabled.php
<source lang='html5'>
<source lang='html5'>
<button onclick="alert('Hello');">Say Hello</button>
<button onclick="alert('Hello');">Say Hello</button>
20번째 줄: 21번째 줄:
*[[버튼]]
*[[버튼]]


[[분류: CSS]]
[[분류: jQuery]]

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

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: jQuery

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

4 같이 보기

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