Browsing articles tagged with " access iframe"
Mar
23
2009
23
2009
วิธีการเข้าถึง iframe ด้วย jQuery
เมื่อมีการทำงานผ่าน Iframe หลายๆคนก็คงจะเกิดปัญหาเดียวกันว่า จะทำอย่างไรถึงจะสามารถ ควบคุม หรือ ดึงค่า เช็คค่าต่างๆ จาก iframe ที่เราเรียกมาได้ แต่ขอเน้นอย่างหนึ่งนะครับ การเข้าถึงหรือ access iframe นั้น ถ้าหากว่า iframe นั้นถูกเรียกมาจาก ต่าง Domain name กันจะเกิดปัญหาด้านความปลอดภัย เราจะไม่สามารถ ดึงข้อมูลหรือกระทำอะไรกับ iframe ที่เราต้องการได้เลยครับ ดังนั้น ถ้าจะใช้วิธีนี้ เราจะต้องใช้ iframe ที่อยู่ภายใต้ Domain name เดียวกัน ตัวอย่าง Code HTML : <iframe id=”myIframe” src=”myContent.html” width=”400″ ></iframe> ตัวอย่าง Code HTML ใน File myContent.html : <html> <body> <div id=”myName”> My Name is jQuery.in.th</div> </body> </html>
Tags
access iframe
advance
Ajax
bind
browser
client-side
cookie
Core
Cross-Site
debugs
delegate
DOM
Effect
event
Events
fadeIn
filters
google
HTML
iframe
Image
jquery
jQuery 1.4
jquery cookie
jquery iframe
jquery plugin
json
jsonp
news
other libraries
overriding
php json
Plugin
selector
Selectors
server
server-side
show()
slideDown
slideToggle
slideUp
ssl
UI
welcome
what's jquery
Categories
- jQuery 1.4 (8)
- jQuery Mobile (2)
- jQuery UI (2)
- News (2)
- Others (23)
- Plugin (11)
- The basics of jQuery (5)
- Tips (12)
- คู่มือการใช้งาน jQuery ฉบับ ภาษา ไทย (25)
- Ajax (4)
- Attributes (1)
- Core (1)
- Effects (7)
- Events (3)
- Manipulation (2)
- Selectors (4)
- Traversing (2)
- Utilities (1)

An article by



