在下面的代码中,我试图构建两个面板;新订单面板和跟踪订单面板。我面临的问题是在第一个面板中打开的两个面板的组件。我不确定你是否理解这个问题。这是代码,您可以尝试清楚地理解它:
<html>
<head>
<script type="text/javascript" src="jscss/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".flip").click(function(){
$(".panel").slideToggle("slow");
});
});
$(document).ready(function(){
$(".flip1").click(function(){
$(".panel1").slideToggle("slow");
});
});
</script>
<style type="text/css">
div.panel,p.flip
{
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 1px #c3c3c3;
}
div.panel
{
height:220px;
display:none;
}
div.panel1,p.flip1
{
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 1px #c3c3c3;
}
div.panel1
{
height:220px;
display:none;
}
</style>
</head>
<body>
<div class="panel">
<form action="Order.php" method="post">
Name<br /><input style="font-weight: bold;" name="name" size="60" type="text" AUTOCOMPLETE=OFF><br /><br />
Subject<br /><input style="font-weight: bold;" name="subject" size="60" type="text" id="subject"><br /> <br />
Email<br /><input style="font-weight: bold;" name="email" size="60" type="text"><br /> <br />
<input type="submit" value="submit" />
</form>
</div>
<div class="panel1">
<form action="Track.php" method="post">
ID<br /><input style="font-weight: bold;" name="id" size="60" type="text" AUTOCOMPLETE=OFF><br /><br />
<input type="submit" value="submit" />
</form>
</div>
<p class="flip">New Order</p>
<br/><br/><br/>
<p class="flip1">Track Order</p>
</body>
</html>
谢谢