HTML <iframe> ชื่อแอตทริบิวต์
ตัวอย่าง
<iframe> ที่ทำหน้าที่เป็นเป้าหมายสำหรับลิงก์:
<iframe src="demo_iframe.htm" name="iframe_a"></iframe>
<a href="https://www.w3schools.com" target="iframe_a">W3Schools.com</a>
ความหมายและการใช้งาน
แอตทริบิวต์name
ระบุชื่อสำหรับ iframe
คุณลักษณะ นี้name
สามารถใช้เพื่ออ้างอิงองค์ประกอบใน JavaScript หรือเป็นค่าของtarget
แอตทริบิวต์ขององค์ประกอบหรือหรือ
<a>
แอตทริบิวต์ขององค์ประกอบหรือ<form>
formtarget
<input>
<button>
รองรับเบราว์เซอร์
Attribute | |||||
---|---|---|---|---|---|
name | Yes | Yes | Yes | Yes | Yes |
ไวยากรณ์
<iframe name="name">
ค่าแอตทริบิวต์
Value | Description |
---|---|
name | Specifies a name for the <iframe> |
❮ แท็ก HTML <iframe>