HTML <form> target å±æ§
å®ä¾
æ交ä¸ä¸ªå¨æ°çªå£ææ°é项å¡ä¸æå¼ç表åï¼å³å¨æ°çªå£ææ°é项å¡ä¸æ¾ç¤ºæ¥æ¶å°çååº:
<form action="/action_page.php"
method="get" target="_blank">
<label for="fname">First name:</label>
<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="æ交">
</form>
亲èªè¯ä¸è¯ »
<label for="fname">First name:</label>
<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="æ交">
</form>
å®ä¹åç¨æ³
target å±æ§è§å®ä¸ä¸ªå称æä¸ä¸ªå ³é®è¯ï¼æ示å¨ä½å¤æå¼ action URLï¼å³å¨ä½å¤æ¾ç¤ºæ交表ååæ¥æ¶å°çååºã
target å±æ§å®ä¹æµè§å¨ä¸ä¸æï¼æ¯å¦é项å¡ãçªå£æå èæ¡æ¶ï¼çå称æå ³é®è¯ã
æµè§å¨æ¯æ
å±æ§ | |||||
---|---|---|---|---|---|
target | Yes | Yes | Yes | Yes | Yes |
è¯æ³
<form target="_blank|_self|_parent|_top|framename">
å±æ§å¼
å¼ | æè¿° |
---|---|
_blank | å¨æ°çªå£/é项å¡ä¸æå¼ã |
_self | å¨åä¸æ¡æ¶ä¸æå¼ãï¼é»è®¤ï¼ |
_parent | å¨ç¶æ¡æ¶ä¸æå¼ã |
_top | å¨æ´ä¸ªçªå£ä¸æå¼ã |
framename | å¨æå®ç iframe ä¸æå¼ã |