技術討論區 > 網頁技術
請問如何將iFrame放進table的td中而之後的td資料仍會顯示
(1/1)
tonyvan123:
1. 主程式
<!DOCTYPE html>
<html>
<head>
<title> 主頁 </title>
<meta http-equiv="Content-Language" content="zh-tw">
<meta http-equiv="content-type" content="text/html; charset=big5">
<meta http-equiv="refresh" content="1200;url=https://www.synvision.com.tw/SonyMobile/reload.php">
<style type="text/css">
header, nav, section, article, footer {
display: block;
}
header, nav, section, article, footer {
color: white;
}
header, footer {
text-align: center;
width: 100%;
}
header {
background-color: red;
font-size: 36px;
font-weight: bold;
}
nav {
display:inline-block;
top: 50px;
left: 8px;
width: 160px;
white-space:nowrap;
background-color: #FFFFBB;
}
nav ul {
margin: 0 auto;
width: 100%;
list-style-type: disc;
list-style: outside;
display: inline;
white-space:wrap;
}
nav ul li {
position: left;
white-space:wrap;
color=blue;
}
section {
width: 100%;
background-color: none;
padding: 20px;
margin: 20px;
}
footer {
background-color: green;
font-size: 10px;
}
iframe:focus {
outline: none;
}
iframe[seamless] {
display: block;
}
</style>
<SCRIPT Language="JavaScript">
function LoadFunction(aID) {
var iFUN=document.getElementById(aID.id);
var iPRG=document.getElementById("src1");
if (iFUN.id=="RMA_Request") {
iPRG.src="RMA_request.php";
iPRG.width="1000";
iPRG.height="1800";
} else if (iFUN.id=="RMA_modify") {
iPRG.src="RMA_modify.php";
} else if (iFUN.id=="RMA_unfinished") {
iPRG.src="RMA_unfinished.php";
} else if (iFUN.id=="RMA_Query") {
iPRG.src="RMA_Query.php";
} else if (iFUN.id=="RMA_Shipping") {
iPRG.src="RMA_Shipping.php";
} else {
iPRG.src="ReLogin.php";
};
}
function showtime24H(){
var msg="";
var now = new Date();
var years = now.getYear()+1900;
var months = now.getMonth()+1;
var days = now.getDate();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
var timeValue = years ;
timeValue += ((months < 10) ? ":0" : ":") + months;
timeValue += ((days < 10) ? ":0" : ":") + days;
timeValue += "-";
timeValue += ((hours < 10) ? ":0" : ":") + hours;
timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
txtMSG=document.getElementById("txtMSG");
txtMSG.value = msg+timeValue;
timerID = setTimeout("showtime24H()",1000);
timerRunning = true;
}
</script>
</head>
<body OnLoad="showtime24H();">
<header>
<table border=0 width="100%">
<tr>
<td align="center" widht="80%">主頁</td>
<td align="right"><input type=text name=txtMSG id=txtMSG size=16 disabled="disabled"></td>
</tr>
</table>
</header>
<nav>
<ul>
<li><a href="#" onClick="LoadFunction(this);" id="RMA_Request">申請</a></li>
<li><a href="#" onClick="LoadFunction(this);" id="RMA_modify">申請修改</a></li>
<li><a href="#" onClick="LoadFunction(this);" id="RMA_unfinished">未結案</a></li>
<li><a href="#" onClick="LoadFunction(this);" id="RMA_Query">查詢</a></li>
<li><a href="#" onClick="LoadFunction(this);" id="RMA_Shipping">出貨查詢</a></li>
<li><a href="#" onClick="LoadFunction(this);" id="ReLogin">重新登入</a></li>
</ul>
</nav>
<section>
<article>
<div align="left" style="position: absolute; top: 60px; left: 190px; width: 1110px; height: 1210px;" >
<iframe name="src1" id="src1" frameborder="0" width="1100" height="1200" sandbox="allow-forms allow-scripts" src="ReLogin.php">
</iframe>
</div>
</article>
</section>
<footer>
</footer>
</body>
</html>
tonyvan123:
2. 頁中程式
<!DOCTYPE html>
<Html>
<Head>
<Title>RAM登錄</Title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<style type="text/css">
<!--
a:hover { color: #FF0000; text-decoration: none}
a:visited { text-decoration: none}
a:link { color: #0000FF; text-decoration: none}
a:active { text-decoration: none}
textarea { height: auto; }
input.right{
text-align:right;
}
-->
</style>
<script language="JavaScript">
<!--
var errfound = false;
var xmlHttp;
function ValidateNumber(e) {
var key;
if(window.event) {
key = e.keyCode;
}else if(e.which) {
key = e.which;
} else {
return true;
}
if(8==key || 46==key){//8:backspace 46:delete (倒退鍵和刪除鍵也允許作用)
return true;
}
var keychar = String.fromCharCode(key);
var reg = /\d/;
return reg.test(keychar);
};
function FieldLength(item,len) {
if (item.value.length > len - 1 ) return false;
else return true;
};
function ValidLength(item, len) {
return (item.length >= len);
}
function MatchLength(item, len) {
document.frmMobile.msg.value = item.length;
return (item.length == len);
}
function ShowMsg(elem, text){
window.alert(text);
elem.select();
elem.focus();
errfound = true;
}
function IsNull( val ) {
var isValid = false;
if (val+"" == "null")
isValid = true;
return isValid;
}
function IsUndef( val ) {
var isValid = false;
if (val+"" == "undefined")
isValid = true;
return isValid;
}
function IsBlank( str ) {
var isValid = false;
if ( IsNull(str) || IsUndef(str) || (str+"" == "") )
isValid = true;
return isValid;
}
function IsAlpha( str ) {
if (str+"" == "undefined" || str+"" == "null" || str+"" == "")
return false;
var isValid = true;
str += "";
for (i = 0; i < str.length; i++) {
if ( !( ((str.charAt(i) >= "a") && (str.charAt(i) <= "z")) ||
((str.charAt(i) >= "A") && (str.charAt(i) <= "Z")) ) ) {
isValid = false;
break;
}
}
return isValid;
}
function IsAlphaNum( str ) {
if (str+"" == "undefined" || str+"" == "null" || str+"" == "")
return false;
var isValid = true;
str += "";
for (i = 0; i < str.length; i++) {
if (!(((str.charAt(i) >= "0") && (str.charAt(i) <= "9")) ||
((str.charAt(i) >= "a") && (str.charAt(i) <= "z")) ||
((str.charAt(i) >= "A") && (str.charAt(i) <= "Z"))))
{
isValid = false;
break;
}
}
return isValid;
}
function IsValidEmail( str ) {
if (str+"" == "undefined" || str+"" == "null" || str+"" == "")
return false;
var isValid = true;
str += "";
namestr = str.substring(0, str.indexOf("@"));
domainstr = str.substring(str.indexOf("@")+1, str.length);
if (IsBlank(str) || (namestr.length == 0) ||
(domainstr.indexOf(".") <= 0) ||
(domainstr.indexOf("@") != -1) ||
!IsAlpha(str.charAt(str.length-1)))
isValid = false;
return isValid;
}
function jsGetDPY(iPtype) {
var selectedValue = iPtype.options[iPtype.selectedIndex].value;
var iPRG=document.getElementById("SetDPY");
//document.frmMobile.query.value="SetDPY";
iPRG.src="CompanySetDPY1.php"+"?MODE="+selectedValue;
};
function jsSetProductMode(iPtype)
{
var selectedValue = iPtype.options[iPtype.selectedIndex].value;
var DocRoot=document.getElementById("DocRoot");
document.frmMobile.query.value="SetMode";
window.location.href = DocRoot.value+"/Company/CompanySetModeDPY.php"+"?iKIND="+selectedValue;
}
function jsSubmit()
{
var num=document.frmMobile.quantity.value;
if ( num < 1 ) {
errfound = true;
ShowMsg(document.frmMobile.quantity, '數量不能小於 1 !');
}
if (errfound==true) {
document.frmMobile.query.value="error-found";
} else {
document.frmMobile.query.value="submit";
};
}
function AlertMsg()
{
var ipar = window.parent;
var msg1="送修時請勿將機卡、機卡托盤、附配件一起送修\n";
var msg2="若需附上配件一起檢測時,請在備註欄位加註說明\n";
var msg3="Model ZR (NNN)機種,送修時請將背蓋一起送修\n";
window.alert(msg1+msg2+msg3);
}
function Validate()
{
}
//-->
</script>
</Head>
<body bgcolor="#ffffff" OnLoad="AlertMsg();">
<form onSubmit="return Validate();" method="post" name="frmMobile" target="_self" id="frmMobile" width="100%">
<table width="100%" border="0" name="mainTable" id="mainTable">
<tr>
<td width="16%" height="14"> </td>
<td height="14" bgcolor="#ffffff">
<div align="center"><IMG height=22 width=106 src=https://www.synvision.com.tw/agent/callfix/images/service_regist_title.gif ><br>
</div>
<hr>
<center>
<font color="#400080" size="2"><font color="#ff0000"></font></font> <font color="#400080" size="2">:
</font>
</center>
</td>
<td width="15%" height="14px">
</td>
</tr>
<tr>
<td width="16%" height="286"> </td>
<td height="286" bgcolor="#004080">
<table width="100%" border="0" height="257" align="center">
<tr>
<td width="30%" height="30px" bgcolor="#99cccc" align="right"><font face="新細明體" size="2" color="#333333">
商品名稱:</font>
</td>
<td width="68%" height="30px" bgcolor="#cccccc">
<select id="ProductKind" name="ProductKind" STYLE='BACKGROUND-COLOR:#44FFFF' onChange='javascript: jsSetProductMode(this)'>
<option value=DPA(單機) selected='selected'>DPA(單機)</option> <option value=DOA>DOA</option> <option value=機板>機板</option> <option value=配件>配件</option> <option value=藍芽>藍芽</option> </select>
<font size="2" color="#ff0000">*</font>
</td>
</tr>
<tr>
<td width="30%" height="30px" bgcolor="#99cccc" align="right"><font face="新細明體" size="2" color="#333333">機型:</font></td>
<td width="68%" height="30px" bgcolor="#cccccc">
<select name="ProductMode" id="ProductMode" STYLE="BACKGROUND-COLOR:#FFFFFF" onChange='javascript: jsGetDPY(this) ;'>
<option value=N1 selected='selected'>N1</option> <option value=N2>N2</option> </select>
</td>
</tr>
<tr>
<td width="30%" height="30px" bgcolor="#99cccc" align="right"><font face="新細明體" size="2" color="#333333">DPY No:</font></td>
<td width="68%" height="30px" bgcolor="#cccccc">
<div width="68%" height="30px">
<iframe name="SetDPY" id="SetDPY" vspace="50%" style="width:50%; height:50%; display:box;" frameborder="0" sandbox="allow-forms
allow-scripts allow-top-navigation" scrolling=no src="CompanySetDPY1.php" ?MODE=N1 >
</div>
</td>
</tr>
<tr>
<td width="30%" height="30px" bgcolor="#99cccc" align="right"><font face="新細明體" size="2" color="#333333">數量:</font></td>
<td width="68%" height="30px" bgcolor="#cccccc">
<input class="right" type="text" name="quantity" id="quantity" maxlength="3" size="3" style="ime-mode:disabled" onkeypress="return ValidateNumber(event)"
value=>
</td>
</tr>
</table>
<table name="tabMSG" id="tabMSG">
<tr><td>
<input type="submit" value="新 增" name="submit" onclick="javascript: jsSubmit();">
<input type="hidden" name="query" id="query" value="">
<input type="hidden" name="DocRoot" id="DocRoot" value="https://www.synvision.com.tw">
<input type="test" name="txtMEMO" id="txtMEMO" value="">
</td></tr>
<tr><td>
訊息::MSG=,KIND:DPA(單機)
</td></tr>
</table>
</td>
</tr>
</table>
</form>
<div align="left" style="position: absolute; top: 120;left: 100px;width: 210px;height: 125px;" >
<iframe name="list1" id="list1" frameborder="0" width="900" height="800" sandbox="allow-forms allow-scripts" src="RMA_request_list.php">
</iframe>
</div>
</body>
</html>
tonyvan123:
3. 第3支程式
<!DOCTYPE html>
<Html>
<Head>
<Title>RAM登錄 Set DPY</Title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</Head>
<body>
<select name='DPY' width='180px' STYLE='BACKGROUND-COLOR: #FFFFFF' > <option value=2233-黑色 selected='selected'>2233-黑色</option> <option value=3366-白色>3366-白色</option></select></body>
</html>
tonyvan123:
此為整個頁面
問題在 iframe name="SetDPY" 之後還有一個 td 用以輸入 數量 不會顯示
tonyvan123:
自問自答,是少了一個 </iframe>
找到了也氣死了,浪費了我8個工作小時
導覽
[0] 文章列表
前往完整版本