HTML button Tag

기본 구문의 예 

     <button>Click here</button>

버튼 양식 내에서 중첩

<form action="/html_5/tags/html_form_tag_action.cfm" method="get" target="_blank">
First name:
<input type="text" name="first_name" maxlength="100">
<br />
Last name:
<input type="text" name="last_name" maxlength="100">
<button type="submit">Submit</button>
</form>

image

 

 

이미지와 버튼

<button onclick="JavaScript:alert('You will love this book!')">
<img src="/pix/web_graphics/free_website_graphics/icons/books/book13.gif" alt="Read book">
<br>Read Book!</button>

image

 

 

파알다운로드 버튼 링크

<a href=”http://사이트이름/quot.zip”><button>Download Test</button></a>

 

버튼링크 처리

팝업창으로 띄우기

onclick=”window.open(‘페이지’,’win’,’윈도우 팝업 옵션’)”;

<input type=”button” name=”버튼” value=”테스트” onclick=”window.open(‘#,’win’,’width=350,height=250,toolbar=0,scrollbars=0,resizable=0′)”;>

새창으로 띄우기

onclick=”window.open(‘페이지’)”;

<input type=”button” name=”버튼” value=”테스트” omclick=”window.open(‘#‘)”;>

현재창으로

onclick=”location.href=’페이지’”;

<input type=”button” name=”버튼” value=”테스트” omclick=”location.href=’#“;>

프레임이 있을때
onclick=”parent.프레임명.location.href=’페이지’”;

<input type=”button” name=”버튼” value=”테스트” onclick=”parent.프레임명.location.href=’#“;>

참고로 아이프레임에서 프레임이 있을 때(parent 더 추가)
onclick=”parent.parent.프레임명.location.href=’페이지’”;

<input type=”button” name=”버튼” value=”테스트” onclick=”parent.parent.프레임명.location.href=’#“;>

“HTML button Tag”의 17개의 댓글

  1. Thanks , I’ve just been searching for information about this subject
    for ages and yours is the best I’ve discovered till now.
    However, what in regards to the conclusion? Are you certain about
    the supply?

  2. An impressive share! I have just forwarded this onto a
    co-worker who was conducting a little research on this.
    And he actually bought me lunch simply because I found it for him…
    lol. So let me reword this…. Thank YOU for the meal!!
    But yeah, thanx for spending time to talk about this issue here on your web page.

  3. I am curious to find out what blog platform you’re utilizing?
    I’m having some minor security issues with my latest website and I’d like to find something more safe.
    Do you have any recommendations?

  4. Hey there are using WordPress for your site platform?

    I’m new to the blog world but I’m trying to get started and set up my own. Do you need any html coding expertise to make your own blog?
    Any help would be really appreciated!

  5. Somebody necessarily lend a hand to make seriously articles I would state.
    That is the very first time I frequented your web page and so far?
    I amazed with the research you made to make this actual put up
    amazing. Magnificent process! adreamoftrains best hosting

  6. I’m usually to blogging and i actually appreciate your content. The article has genuinely peaks my interest. I’m going to bookmark your web page and maintain checking for new details.kindly visit us.

댓글 남기기