|
|
|
เราจะใช้ link Named Anchor ใน iframe ยังไงครับให้มันไปยังตำแหน่งที่ต้องการ |
|
|
|
|
|
|
|
ขอสอบถามครับ ผมได้ทำการสร้าง iframe ไว้ที่หน้า index.php มา2ส่วน ส่วนบนดึงมาจากหน้า topmanu.php ส่วนล่างดึงข้อมูลมาจากหน้า main.php ผมจะทำยังไงให้กดเมนูที่ผมสร้างด้วย rollover image ให้ที่หน้า main.php ไปที่ตำแหน่งที่กดเลือก Named Anchor ไว้
topmanu.php
Code (PHP)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
</head>
<body onload="MM_preloadImages('images/Bu-home.png','images/Bu-product.png','images/Bu-contact.png')">
<table width="1280" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="left">
<th width="128" align="center" scope="col"> </th>
<th width="163" bgcolor="#6B6D73" scope="col"><img src="images/GWE.png" width="163" height="91" /></th>
<th width="406" bgcolor="#6B6D73" scope="col"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home','','images/Bu-home.png',1)"><img src="images/wh-home.png" width="106" height="40" id="home" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('product','','images/Bu-product.png',1)"><img src="images/wh-product.png" width="134" height="40" id="product" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact','','images/Bu-contact.png',1)"><img src="images/wh-contact.png" width="165" height="41" id="contact" /></a></th>
<th width="453" valign="baseline" bgcolor="#6B6D73" scope="col"> </th>
<th width="129" valign="baseline" scope="col"> </th>
</tr>
</table>
</body>
</html>
main.php
Code (PHP)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.GWE1 {
font-weight: bold;
color: #FFF;
}
.GWE2 {
font-size: 10px;
}
.GWE2 {
color: #FFF;
}
.GWE2 {
font-family: "Browallia New";
}
.GWE2 {
font-size: 14px;
}
.GWE2 {
font-size: 16px;
}
</style>
</head>
<body>
<table width="1280" border="0" align="center" cellpadding="0" cellspacing="0"><form id="form1" name="form1" method="post" action="">
<tr align="center" valign="top">
<th width="128" scope="col"> </th>
<th colspan="3" align="center" valign="top"><img src="images/1.png" width="1024" height="445" /></th>
<th width="128" scope="col"> </th>
</tr>
<tr>
<th width="128" scope="col"><a name="product"></a></th>
<th colspan="3" align="center" valign="top" scope="60%"><img src="images/17-5-59_03.png" width="1024" height="56" /></th>
<th width="128" align="center" valign="top" scope="20%"> </th>
</tr>
<tr>
<th scope="col"> </th>
<th colspan="3" scope="100%"><table width="1023" border="0">
<tr>
<th scope="col"><img src="images/Web-page_11.png" width="269" height="216" /></th>
<th scope="col"><img src="images/Web-page_12.png" width="269" height="216" /></th>
<th scope="col"><img src="images/Web-page_14.png" width="297" height="216" /></th>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
<td> </td>
</tr>
</table></th>
<th align="center" valign="top" scope="20%"> </th>
</tr>
<tr>
<th width="128" scope="col"> </th>
<th colspan="3" scope="100%"> </th>
<th width="128" align="center" valign="top" scope="20%"> </th>
</tr>
<tr>
<th width="128" scope="col"> </th>
<th width="67" height="10" bgcolor="#1b75b8" scope="100%"> </th>
<th height="40" colspan="2" align="left" bgcolor="#1b75b8" class="GWE1" scope="100%">บริษัท กรีน วอเตอร์ เอ็นจิเนี่ยริ่ง จำกัด</th>
<th width="128" align="center" valign="top" scope="20%"> </th>
</tr>
<tr>
<th width="127" rowspan="8" scope="col"> </th>
<th bgcolor="#1b75b8" scope="100%"> </th>
<th height="30" colspan="2" align="left" valign="top" bgcolor="#1b75b8" class="GWE2" scope="100%">กรุณากรอกข้อมูลด้านล่าง เราจะทำการติดต่อกลับโดยเร็วที่สุด</th>
<th width="128" rowspan="8" align="center" valign="top" scope="20%"> </th>
</tr>
<tr>
<th bgcolor="#1b75b8" scope="100%"> </th>
<th width="125" height="30" align="left" valign="top" bgcolor="#1b75b8" class="GWE2" scope="100%">ชื่อ </th>
<th width="833" align="left" valign="top" bgcolor="#1b75b8" class="GWE2" scope="100%"><label for="name"></label>
<input name="name" type="text" id="name" size="50" /></th>
</tr>
<tr>
<th bgcolor="#1b75b8" scope="100%"> </th>
<th width="125" height="30" align="left" valign="top" bgcolor="#1b75b8" class="GWE2" scope="100%">โทรศัพท์</th>
<th width="833" height="30" align="left" valign="top" bgcolor="#1b75b8" class="GWE2" scope="100%"><label for="tel"></label>
<input name="tel" type="text" id="tel" size="10" /></th>
</tr>
<tr>
<th bgcolor="#1b75b8" scope="100%"> </th>
<th width="125" height="30" align="left" valign="top" bgcolor="#1b75b8" class="GWE2" scope="100%">อีเมล</th>
<th width="833" height="30" align="left" valign="top" bgcolor="#1b75b8" class="GWE2" scope="100%"><label for="email"></label>
<input name="email" type="text" id="email" size="30" /></th>
</tr>
<tr>
<th bgcolor="#1b75b8" scope="100%"> </th>
<th width="125" height="30" align="left" valign="top" bgcolor="#1b75b8" class="GWE2" scope="100%">สินค้าที่ท่านสนใจ</th>
<th width="833" height="30" align="left" valign="top" bgcolor="#1b75b8" class="GWE2" scope="100%"><label for="product"></label>
<select name="product" id="product">
</select></th>
</tr>
<tr>
<th bgcolor="#1b75b8" scope="100%"> </th>
<th width="125" height="30" align="left" valign="top" bgcolor="#1b75b8" class="GWE2" scope="100%">ข้อความ</th>
<th width="833" height="30" align="left" valign="top" bgcolor="#1b75b8" class="GWE2" scope="100%"><label for="massage">
<textarea name="massage" id="massage" cols="45" rows="5"></textarea>
</label></th>
</tr>
<tr>
<th bgcolor="#1b75b8" scope="100%"> </th>
<th width="125" height="30" align="left" bgcolor="#1b75b8" class="GWE2" scope="100%"> </th>
<th width="833" height="30" align="left" bgcolor="#1b75b8" class="GWE2" scope="100%">
</th>
</tr>
<tr>
<th bgcolor="#1b75b8" scope="100%"> </th>
<th height="30" colspan="2" align="left" bgcolor="#1b75b8" scope="100%"> </th>
</tr>
</form></table>
</body>
</html>
Tag : PHP, MySQL
|
|
|
|
|
|
Date :
2016-05-17 21:21:29 |
By :
karurub |
View :
842 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|