HTML <input> formtarget 속성

❮ HTML <입력> 태그

예시

서로 다른 대상 창이 있는 두 개의 제출 버튼이 있는 양식:

<form action="/action_page.php">
  <input type="text" id="fname" name="fname"><br><br>
  <label for="lname">Last name:</label>
  <input type="text" id="lname" name="lname"><br><br>
  <input type="submit" value="Submit as normal">
  <input type="submit" formtarget="_blank" value="Submit to a new window">
</form>

정의 및 사용

속성 은 formtarget양식을 제출한 후 받은 응답을 표시할 위치를 나타내는 이름 또는 키워드를 지정합니다.

속성은 요소 의 속성을 formtarget재정의합니다 .target<form>

참고:formtarget 속성은 및 와 함께 사용할 type="submit"있습니다 type="image".


브라우저 지원

표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.

Attribute
formtarget Yes 10.0 Yes 5.1 10.6

통사론

<input formtarget="_blank|_self|_parent|_top|framename">

속성 값

Value Description
_blank The response is displayed in a new window or tab
_self The response is displayed in the same frame (this is default)
_parent The response is displayed in the parent frame
_top The response is displayed in the full body of the window
framename The response is displayed in a named iframe

❮ HTML <입력> 태그