การดึงข้อมูลจากเวปอื่น ๆ ถ้าเราใช้ แค่
ตัวอย่างโค๊ด
<iframe src="http://www.sanook.com" width="440" height="280"></iframe>จะดึงข้อมูลมาได้ แต่จะจัดตำแหน่งการแสดงผลไม่ได้ แต่ถ้าเปลี่ยนวิธี โดยการใช้ CSS ช่วยในการ
แสดงผลด้วย
ตัวอย่าง
<html>
<head>
<style type="text/css">
#outerdiv {
height: 280px;
overflow: hidden;
position: relative;
width: 440px;
}
#inneriframe {
height: 1200px;
left: -220px;
position: absolute;
top: -880px;
width: 820px;
}
</style>
</head>
<body>
<div id="outerdiv">
<iframe src="http://www.sanook.com" id="inneriframe"></iframe>
</div>
</body>
</html>
จะสามารถจัดตำแหน่งการแสดงของข้อมูล เวปนั้น ๆ ได้ ปรับแต่งข้อมูลจาก http://www.thaiseoboard.com/index.php?topic=169115.0
<style type="text/css">
#outerdiv {
height: 280px;
overflow: hidden;
position: relative;
width: 440px;
}
#inneriframe {
height: 1200px;
left: -220px;
position: absolute;
top: -880px;
width: 820px;
}
</style>
</head>
<body>
<div id="outerdiv">
<iframe src="http://www.sanook.com" id="inneriframe"></iframe>
</div>
</body>
</html>
จะสามารถจัดตำแหน่งการแสดงของข้อมูล เวปนั้น ๆ ได้ ปรับแต่งข้อมูลจาก http://www.thaiseoboard.com/index.php?topic=169115.0