这是改之前的代码,运行的非常好 :(
<HTML>
<HEAD ID="Header" >
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome</title>
<style type="text/css">
<!--
#TAB_CreditCard{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_CreditCard.gif) no-repeat;
cursor: pointer;
float: left;
width: 155px;
height: 35px;
background-color:#cccccc;
border:1 solid #FF0000;}
#TAB_CreditCard_active{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_CreditCard_active.gif) no-repeat;
float: left;
width: 155px;
height: 35px;
background-color:#FFCC00;
border:1 solid #FF0000;}
#TAB_PurchaseOrder{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_PurchaseOrder.gif) no-repeat;
cursor: pointer;
float: left;
width: 155px;
height: 35px;
background-color:#cccccc;
border:1 solid #FF0000;}
#TAB_PurchaseOrder_active{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_PurchaseOrder_active.gif) no-repeat;
float: left;
width: 155px;
height: 35px;
background-color:#FFCC00;
border:1 solid #FF0000;}
#TAB_RequestForQuote{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_RequestForQuote.gif) no-repeat;
cursor: pointer;
float: left;
width: 155px;
height: 35px;
background-color:#cccccc;
border:1 solid #FF0000;}
#TAB_RequestForQuote_active{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_RequestForQuote_active.gif) no-repeat;
float: left;
width: 155px;
height: 35px;
background-color:#FFCC00;
border:1 solid #FF0000;}
#TAB_RequisitionApproval{background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_RequisitionApproval.gif) no-repeat;
cursor: pointer;
float: left;
width: 170px;
height: 35px;
background-color:#cccccc;
border:1 solid #000000;}
#TAB_RequisitionApproval_active{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_RequisitionApproval_active.gif) no-repeat;
float: left;
width: 170px;
height: 35px;
background-color:#FFCC00;
border:1 solid #FF0000;}
#pmt_CreditCard,#pmt_PurchaseOrder,#pmt_RequestForQuote,#pmt_RequisitionApproval{
border:5 solid #FF0000;
float:left;
clear:both;}
--></style>
</HEAD>
<HTML>
<HEAD ID="Header" >
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome</title>
<style type="text/css">
<!--
#TAB_CreditCard{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_CreditCard.gif) no-repeat;
cursor: pointer;
float: left;
width: 155px;
height: 35px;
background-color:#cccccc;
border:1 solid #FF0000;}
#TAB_CreditCard_active{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_CreditCard_active.gif) no-repeat;
float: left;
width: 155px;
height: 35px;
background-color:#FFCC00;
border:1 solid #FF0000;}
#TAB_PurchaseOrder{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_PurchaseOrder.gif) no-repeat;
cursor: pointer;
float: left;
width: 155px;
height: 35px;
background-color:#cccccc;
border:1 solid #FF0000;}
#TAB_PurchaseOrder_active{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_PurchaseOrder_active.gif) no-repeat;
float: left;
width: 155px;
height: 35px;
background-color:#FFCC00;
border:1 solid #FF0000;}
#TAB_RequestForQuote{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_RequestForQuote.gif) no-repeat;
cursor: pointer;
float: left;
width: 155px;
height: 35px;
background-color:#cccccc;
border:1 solid #FF0000;}
#TAB_RequestForQuote_active{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_RequestForQuote_active.gif) no-repeat;
float: left;
width: 155px;
height: 35px;
background-color:#FFCC00;
border:1 solid #FF0000;}
#TAB_RequisitionApproval{background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_RequisitionApproval.gif) no-repeat;
cursor: pointer;
float: left;
width: 170px;
height: 35px;
background-color:#cccccc;
border:1 solid #000000;}
#TAB_RequisitionApproval_active{
background: url(../images/themes/Amazon_Green/CheckoutSteps/TAB_RequisitionApproval_active.gif) no-repeat;
float: left;
width: 170px;
height: 35px;
background-color:#FFCC00;
border:1 solid #FF0000;}
#pmt_CreditCard,#pmt_PurchaseOrder,#pmt_RequestForQuote,#pmt_RequisitionApproval{
border:5 solid #FF0000;
float:left;
clear:both;}
--></style>
</HEAD>
<DIV class="FixPageWidth">
<TABLE cellpadding="0" cellspacing="0" class="Table1">
<TR>
<TD class="TD_valign_top content">
<DIV id="Middle" >
<DIV id="CheckoutSteps_SubHeader">
<DIV id="CheckoutSteps_SubHeader_Title">
<DIV id="TAB_CreditCard" onClick="showDiv('CreditCard')">111 </DIV>
<DIV id="TAB_PurchaseOrder" onClick="showDiv('PurchaseOrder')"> 222</DIV>
<DIV id="TAB_RequestForQuote" onClick="showDiv('RequestForQuote')"> 333</DIV>
<DIV id="TAB_RequisitionApproval" onClick="showDiv('RequisitionApproval')">444 </DIV>
</DIV>
<DIV id="CheckoutSteps_SubHeader_Step4"> </DIV>
<DIV class="CheckoutSteps_Underline"> </DIV>
</DIV>
<DIV id="CheckoutSteps_EditSection">
<FORM id="frmCreditCard" action="index.aspx?Command=CreditCardPost" method="post" onSubmit="return validateOnSubmit()">
<DIV id="pmt_CreditCard">
<SPAN class="payMethodInfo"> <SPAN class="txtCont"> You have chosen to checkout using a <SPAN class="Note-Emphasis1">Credit Card</SPAN>.
<DIV class="Line1_Middle"> </DIV>
<DIV class="divInst">
<P> <SPAN class="txtHead">Instructions:</SPAN> </P>
Type in your credit card information and then click <SPAN class="txtCont">Continue</SPAN>. </DIV>
<BR>
<SCRIPT>
F = document.forms['frmCreditCard'];
setSelected(F.CardType, '');
setSelected(F.ExpiryMonth, '');
setSelected(F.ExpiryYear, '');
</SCRIPT>
</DIV>
</FORM>
<FORM id="frmPurchaseOrder" action="index.aspx?Command=PurchaseOrderPost" method="post">
<DIV id="pmt_PurchaseOrder" style="display:none">
<SPAN class="payMethodInfo"> <SPAN class="txtCont"> You have chosen to checkout using a <SPAN class="Note-Emphasis1">Purchase Order</SPAN>.
To checkout using a
Credit Card,
Request For Quote or
Requisition Approval;
please click one of the tabs above. </SPAN> </SPAN>
<DIV class="Line1_Middle"> </DIV>
<DIV class="divInst"> <SPAN class="txtHead">Instructions:</SPAN> <BR>
<BR>
<SPAN class="txtHead">Purchase Order - Open Account</SPAN> <BR>
<BR>
We will gladly process your Purchase Order. Our terms are net 30 days to approved credit.<BR>
We will extend credit to businesses only. Once credit is approved, a confirmation email will be<BR>
sent with approximate shipping date. Invoice mailed separately within two days of shipment.<BR>
<BR>
<SPAN class="txtHead">New Accounts</SPAN><BR>
To open a credit account, download our <A href="common/pdfs/new accounts.pdf">PDF application</A> and fax it back to ,<BR>
Attn: Customer Service. Completed Applications will be processed immediately to ensure future<BR>
orders have open account terms. Our standard terms are net 30 days. <BR>
<BR>
</DIV>
</DIV>
</FORM>
<FORM id="frmRequestForQuote" style="margin-bottom:0; margin-top:0" action="index.aspx?Command=RequestForQuotePost" method="post">
<DIV id="pmt_RequestForQuote" style="display:none">
<SPAN class="payMethodInfo"> <SPAN class="txtCont"> You have chosen to checkout using a <SPAN class="Note-Emphasis1">Request For Quote</SPAN>.
To checkout using a
Credit Card,
Purchase Order or
Requisition Approval;
please click one of the tabs above. </SPAN> </SPAN>
<DIV class="Line1_Middle"> </DIV>
<DIV class="divInst"> <SPAN class="txtHead">Instructions:</SPAN> <BR>
<BR>
To submit your order as a Request for Quote, click the <B>Finish Order</B> button on the summary page.
We will contact you with details on item costs, shipping and tax information.<BR>
<BR>
</DIV>
<INPUT name="btnContinue" type="submit" value="" class="btnContinue">
</DIV>
</FORM>
<FORM id="frmRequisitionApproval" style="margin-bottom:0; margin-top:0" action="index.aspx?Command=RequisitionApprovalPost" method="post">
<DIV id="pmt_RequisitionApproval" style="display:none">
<SPAN class="payMethodInfo">
<SPAN class="txtCont"> You have chosen to checkout using a <SPAN class="Note-Emphasis1">Requisition Approval</SPAN>.
To checkout using a
Credit Card,
Purchase Order or
Request For Quote;
please click one of the tabs above. </SPAN> </SPAN>
<DIV class="Line1_Middle"> </DIV>
<DIV class="divInst"> <SPAN class="txtHead">Instructions:</SPAN> <BR>
<BR>
<SPAN class="txtHead">Fax Requisition</SPAN> – The Order Requisition form allows you to obtain any necessary signatures for your order.<BR>
The Requisition is then faxed to us.<BR>
<BR>
<DIV><B>Here is how it works:</B><BR>
<BR>
<BR>
1) When you click <SPAN class="txtCont">Continue</SPAN> below you will be taken to the <B>Summary</B> Page<BR>
<BR>
2) On the Summary page, click <B>Finish Order</B>.<BR>
<B>Note:</B> You can add any order comments on this page in the blue box.<BR>
<BR>
3) A <B>Fax Form Icon</B> is shown. Click on this Icon.<BR>
<BR>
4) The Order Requisition can now be printed. Fax the order to the number shown on the form.<BR>
<BR>
</DIV>
</DIV>
<INPUT name="btnContinue" type="submit" value="" class="btnContinue">
</DIV>
</FORM>
</DIV>
</DIV>
<SCRIPT>
selOpt = '';
Options = ['CreditCard', 'PurchaseOrder', 'RequestForQuote', 'RequisitionApproval'];
for(i = 0; i < Options.length; i++)
if(document.getElementById('TAB_' + Options[i]) !== null)
{
selOpt = Options[i];
document.getElementById('TAB_' + selOpt).id = 'TAB_' + selOpt + '_active';
document.getElementById('pmt_' + selOpt).style.display = 'block';
break;
}
function showDiv(divOpt)
{
document.getElementById('TAB_' + selOpt + '_active').id = 'TAB_' + selOpt;
document.getElementById('pmt_' + selOpt).style.display = 'none';
selOpt = divOpt;
document.getElementById('TAB_' + selOpt).id = 'TAB_' + selOpt + '_active';
document.getElementById('pmt_' + selOpt).style.display = 'block';
}
</SCRIPT>
</TD>
</TR>
</TABLE>
</DIV>
</BODY>
</HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome</title><style type="text/css">
<!--
#LeftSection{
float:left;
margin:5px 0 0 1px;
width:250px;
display:block;
}
#P_Section{
float:left;
width:100%;
border:1px solid #FF0000;
background-color:#FFFFCC;
}.P_Select{
float:left;
border-bottom:1px solid #FF0000;
width:100%;
height:35px;
text-align:center;
padding-top:10px;
}
#EditSection{
float:right;
width:680px;
border:0;
margin:5px 60px 5px 0 !important;
margin:5px 30px 5px 0;
padding:0;
border:1px solid #003466;
}#pmt_1,#pmt_2,#pmt_3,#pmt_4
{
width:100%;
}
#pmt_1,#pmt_2,#pmt_3,#pmt_4{
display:none;
}
.SelectP{
padding-left: 2px;
font-family:Arial, Helvetica, sans-serif;
border: #CCCCCC 1px solid;
height:20px;
width:200px;
}
-->
</style>
</head>
<body>
<SELECT name="selectid" class="SelectP" onchange="showDiv(document.all.selectid.value)">
<option value="1" >>> Layer1</option>
<option value="2" >>> Layer2</option>
<option value="3" >>> Layer3</option>
<option value="4" >>> Layer4</option>
</SELECT>
<div id="EditSection"><br>Layer1.ddd<br></div>
<div id="pmt_2"><br>Layer2 Layer2 .<br></div>
<div id="pmt_3"><br>Layer3 Layer3 Layer3 <br></div>
<div id="pmt_4"><br>Layer4 Layer4 Layer4 Layer4 <br></div>
<div id="pmt_1"><br>Lasdfasyer1.ddd<br></div>
<SCRIPT>
function showDiv(divOpt)
{
//alert(document.getElementById('pmt_' + divOpt).outerHTML);
document.getElementById('EditSection').innerHTML = document.getElementById('pmt_' + divOpt).innerHTML;
}
</SCRIPT>
</div>
</body>
</html>
还是,太简单了不屑于回答呢?