[Form] form 태그 안에서의 button 태그의 사용 방법(button, a, input type=submit)
2015.06.21 22:42
361
0
https://eond.com/359102
object(HotopayModel)#900 (23) { ["error"]=> int(0) ["message"]=> string(7) "success" ["variables"]=> array(0) { } ["httpStatusCode"]=> int(200) ["module"]=> string(7) "hotopay" ["module_info"]=> NULL ["origin_module_info"]=> NULL ["module_config"]=> NULL ["module_path"]=> string(52) "/home/eond/web/eond.com/public_html/modules/hotopay/" ["xml_info"]=> NULL ["module_srl"]=> NULL ["mid"]=> NULL ["act"]=> NULL ["template_path"]=> NULL ["template_file"]=> NULL ["layout_path"]=> NULL ["layout_file"]=> NULL ["edited_layout_file"]=> NULL ["stop_proc"]=> bool(false) ["user"]=> object(Rhymix\Framework\Helpers\SessionHelper)#899 (20) { ["member_srl"]=> int(0) ["user_id"]=> NULL ["user_name"]=> NULL ["nick_name"]=> NULL ["email_address"]=> NULL ["phone_number"]=> NULL ["homepage"]=> NULL ["blog"]=> NULL ["birthday"]=> NULL ["denied"]=> NULL ["status"]=> NULL ["is_admin"]=> string(1) "N" ["is_site_admin"]=> NULL ["profile_image"]=> NULL ["image_name"]=> NULL ["image_mark"]=> NULL ["signature"]=> NULL ["description"]=> NULL ["group_list"]=> array(0) { } ["menu_list"]=> array(0) { } } ["request"]=> object(Rhymix\Framework\Request)#10 (13) { ["method"]=> string(3) "GET" ["compat_method"]=> string(3) "GET" ["url"]=> string(28) "coding/359102/comment/465121" ["hostname"]=> string(8) "eond.com" ["domain"]=> NULL ["protocol"]=> string(5) "https" ["callback_function"]=> string(0) "" ["_route_status":protected]=> int(200) ["_route_options":protected]=> object(stdClass)#11 (5) { ["cache_control"]=> bool(true) ["check_csrf"]=> bool(true) ["is_forwarded"]=> bool(false) ["is_indexable"]=> bool(true) ["enable_session"]=> bool(true) } ["module"]=> string(5) "board" ["mid"]=> string(6) "coding" ["act"]=> string(16) "dispBoardContent" ["args"]=> array(5) { ["page"]=> int(3) ["document_srl"]=> string(6) "359102" ["comment_srl"]=> string(6) "465121" ["mid"]=> string(6) "coding" ["act"]=> string(16) "dispBoardContent" } } ["ajaxRequestMethod"]=> array(2) { [0]=> string(6) "XMLRPC" [1]=> string(4) "JSON" } ["gzhandler_enable"]=> bool(true) }

button 태그와 a 태그의 기능을 혼동해서 사용하는 경우를 종종 발견하게 됩니다.
그럼 button, a, input type='submit'의 차이는 무엇일까요.

요약하자면, a 링크가 있는 경우는 a 태그를 사용하고 스크립트로 동작하는 건 button 태그를 사용합니다.
예전에 input type="submit"을 많이 사용했는데 디자인상에 이점으로 button 태그를 이용하는 겁니다.

자세한 사항은 아래 참조 사이트 글을 참조하시기 바랍니다.

※참조사이트

1. input type="submit" vs button 비교
http://webdir.tistory.com/421

2. a, button, input type="button" 구분하기 / button, submit, reset 구분하기
http://star_ruby7.blog.me/220289562249

3. <a> 태그와 <button> 태그를 상황에 맞게 구분하자
http://ohgyun.com/307

4. 모체 form 개체 속에 단추 모양으로 사용자 데이터를 입력필드 button 개체를 단추 용기로 생성하고 풍부한 HTML 표현을 지원한다.
http://koxo.com/lang/js/object/button.html

#button type="submit"

라이믹스는 이온디와 함께

HTML5/CSS3
-
+
닫기

마이페이지

로그인을 해주세요

네이버로 로그인