sadffffffffffffffffffaaaaaaaaaaaaaaaqqqqqqqqqqqqqqqq

本文介绍了一个包含多种交互功能的网页布局设计方案,通过JavaScript实现了上下滚动显示不同内容的效果,并且具备了下拉菜单、颜色筛选等功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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 runat="server">
<title>無題のページ</title>
<script language="javascript" type="text/javascript">

  var all = 9;
  var hand = null;
  var size = null;
  var moveflg = null;
  var heightOfLine = 15;
 
  function upclick() {
    var ctl = document.getElementById("designers");
    var nowtop = parseInt(ctl.style.marginTop);
    if (nowtop <= -(all - 4) * heightOfLine) {
     
      clearInterval(hand);
      hand = null;
      size = null;
      moveflg = null;
      return;
    }
 
    if (hand != null) {
      return;
    }
   
    size = nowtop - heightOfLine;
    moveflg = "up";
    hand=setInterval(moveDiv, 10);
  }

  function moveDiv() {
    var ctl = document.getElementById("designers");
    var nowtop = 0;
    if (moveflg == "up") {

      nowtop = parseInt(ctl.style.marginTop);
      nowtop--;
   
      if (nowtop == size) {
        clearInterval(hand);
        hand = null;
        size = null;
        moveflg = null;
      }

      ctl.style.marginTop = nowtop + "px";
      return;
    }
   
    nowtop = parseInt(ctl.style.marginTop);
    nowtop++;

    if (nowtop == size) {
      clearInterval(hand);
      hand = null;
      size = null;
      moveflg = null;
    }

    ctl.style.marginTop = nowtop + "px";
    return;
  }

  function downclick() {
      var ctl = document.getElementById("designers");
      var nowtop = parseInt(ctl.style.marginTop);
      if (nowtop == 0) {
        clearInterval(hand);
        hand = null;
        size = null;
        moveflg = null;
        return;
      }

      if (hand != null) {
        return;
      }

      size = nowtop + heightOfLine;
      moveflg = "do";
      hand = setInterval(moveDiv, 10);
  }

  var $ = function (id) {
    return "string" == typeof id ? document.getElementById(id) : id;
  }
   
  var DivDown = function(id, time) {
    this.pId = id;
    this.pTime = time;
    this.pTimeHandle = null;
    this.pMaxSize = 20;
  }
   
  DivDown.prototype = {
    Run : function() {
      var ctlDown = $("dropdownContain");
     
      if (!ctlDown) {
        return;
      }
     
      var height = parseInt(ctlDown.currentStyle.height);
     
      if (height != 0) {
        return;
      }
     
      if (this.pTimeHandle != null) {
        window.clearInterval(this.pTimeHandle);
        this.pTimeHandle = null;
      }
       
      this.pTimeHandle = window.setInterval(ChangeSize(this), this.pTime);
    }
  }
   
  function ChangeSize(divData) {
    return function () {
     
      var ctlDown = $(divData.pId);
      var height = parseInt(ctlDown.currentStyle.height);
      height++;
      if (height > divData.pMaxSize) {
        window.clearInterval(divData.pTimeHandle);
        divData.pTimeHandle = null;
        return;
      }
      ctlDown.style.height = height+"px";
    };
  }
 
  function hiddenLeftMenu() {
    var ctlDown = $("haveHat");
    ctlDown.style.visibility = "visible";
    ctlDown = $("notHat");
    ctlDown.style.visibility = "visible";
    ctlDown = $("havepants");
    ctlDown.style.visibility = "visible";
   
    ctlDown = $("shortGown");
    ctlDown.style.visibility = "hidden";
    ctlDown = $("longSleeves");
    ctlDown.style.visibility = "hidden";
    return false;
  }
 
  function hiddenRightMenu() {
    var ctlDown = $("haveHat");
    ctlDown.style.visibility = "hidden";
    ctlDown = $("notHat");
    ctlDown.style.visibility = "hidden";
    ctlDown = $("havepants");
    ctlDown.style.visibility = "hidden";
   
    ctlDown = $("shortGown");
    ctlDown.style.visibility = "visible";
    ctlDown = $("longSleeves");
    ctlDown.style.visibility = "visible";
    return false;
  }
</script>
<style type="text/css">
html,body{margin:0;padding:0}

div#bodyAll
{
  left:0px;
  width:1300px;
  padding:0;
  margin:0 auto;
  text-align:left;
}

div#topBackImage
{
  width:100%;
  height:74px;
  padding:0;
  margin:0 auto;
  background-image:url('../../Img/MSsetiao000.png');
}

div#bodyContainer
{
  width:1202px;
  padding:0;
  margin:0 auto;
  margin-top:-74px;
}

div#bodyMidContainer
{
  width:900px;
  height:985px;
  padding:0;
  margin:0 auto;
  float:left;
}

div#bodyLeftContainer
{
  width:150px;
  padding:0;
  margin:0 auto;
  float:left;
}

div#bodyRightContainer
{
  width:150px;
  padding:0;
  margin:0 auto;
  float:left;
}

div#topMenu
{
  width:100%;
  height:23px;
  padding:0;
  margin:0 auto;
}

input.imgTopMenu
{
  height:22px;
  width:99px;
  border-width:0px;
  margin-top:1px;
}

div#dropdownMenu
{
  width:100%;
  height:20px;
  padding:0;
  margin:0 auto;
}

div#pageLinkMenu
{
  width:100%;
  height:31px;
  padding:0;
  margin:0 auto;
}

input.imgSexMenu
{
  height:23px;
  width:68px;
  border-width:0px;
}

div#leftLine
{
  width:10px;
  height:985px;
  float:right;
  background-image:url('../../Img/MSsetiao007.png');
}

div#leftLink
{
  margin-top:55px;
  vertical-align:bottom;
  float:right;
}

div#rightLine
{
  width:5px;
  height:985px;
  float:left;
  background-image:url('../../Img/MSsetiao008.png');
}

div#rightLink
{
  margin-top:55px;
  vertical-align:bottom;
  float:left;
}

a.pageLink
{
  text-decoration:none;
  color:White;
}

a.pageLinkBlack
{
  text-decoration:none;
  color:Black;
}

span.fontStyle
{
  color:White;
  font-family:华文细黑;
  font-size:x-small;
  font-weight:lighter;
}

div#mainData
{
  width:100%;
  height:880px;
  padding:0;
  margin:0 auto;
}

div#productsList
{
  width:690px;
  float:left;
  height:780px;
  margin-left:20px;
}

span.fontStyleBlack
{
  color:Black;
  font-family:华文细黑;
  font-size:x-small;
  font-weight:lighter;
}

div#colorSelect
{
  float:right;
  width:187px;
  margin-top:5px;
  margin-right:3px;
  text-align:center;
}

div#designer
{
  float:right;
  width:187px;
  height:133px;
  margin-top:5px;
  margin-right:2px;
  background-image:url('../../Img/MSsetiao002.png');
}

div#hotBuy
{
  float:right;
  width:187px;
  height:185px;
  margin-top:15px;
  margin-right:2px;
  background-image:url('../../Img/MStupian000.png');
}

div#hotList
{
  float:right;
  width:187px;
  height:443px;
  margin-top:15px;
  margin-right:2px;
  background-image:url('../../Img/MSsetiao005.png');
}

div#dropdownContain
{
  border:0px;
  width:383px;
  height:0px;
  margin-left:390px;
  overflow:hidden;
}

div#dropdownBack
{
  border:0px;
  width:383px;
  height:20px;
  background-image:url('../../Img/MSsetiao006.png');
}

input.imgDropdownMenu
{
  margin-left:20px;
}

input.imgDropdownRightMenu
{
  margin-left:5px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div id="bodyAll">
  <div id="topBackImage"></div>
  <div id="bodyContainer">
 
    <!-- this part is left of the page. -->
    <div id="bodyLeftContainer">
      <div id="leftLine"></div>
      <div id="leftLink"><span class="fontStyle"><a href="#" class="pageLink">销售信息&nbsp;&nbsp;&nbsp;&nbsp;</a></span></div>
      <div style="width:66px; height:45px;float:right;margin-top:100px;margin-right:-55px;">
        <asp:ImageButton runat="server" ID="newProduct" ImageUrl="~/Img/MSbiaoqianNEW_1.png" Width="66" Height="45" />
      </div>
      <div style="width:68px; height:40px;float:right;margin-top:142px; margin-right:-70px;">
        <asp:ImageButton runat="server" ID="beginSell" ImageUrl="~/Img/MSbiaoqianYS_1.png" Width="68" Height="40" />
      </div>
      <div style="width:64px; height:48px;float:right;margin-top:172px; margin-right:-72px;">
        <asp:ImageButton runat="server" ID="finishSell" ImageUrl="~/Img/MSbiaoqianSW_1.png" Width="64" Height="48" />
      </div>
      <div style="width:69px; height:34px;float:right;margin-top:212px; margin-right:-72px;">
        <asp:ImageButton runat="server" ID="againSell" ImageUrl="~/Img/MSbiaoqianZB_1.png" Width="69" Height="34" />
      </div>
      <asp:HiddenField ID="hidProductStateFlag" runat="server" Value="0" />
    </div>
 
    <div id="bodyMidContainer">
      <!-- this part is the top menu of the page. -->
      <div id="topMenu">
        <input type="image" class="imgTopMenu" name="btn_T_Shirt" id="btn_T_Shirt" src="../../Img/MSbiaoqian00_1.png" style="margin-left:380px;" onclick="new DivDown('dropdownContain', 40).Run();hiddenRightMenu();return false;"/>
        <input type="image" class="imgTopMenu" name="btn_W_Shirt" id="btn_W_Shirt" src="../../Img/MSbiaoqian01_1.png" onclick="new DivDown('dropdownContain', 40).Run();hiddenLeftMenu();return false;"/>
        <asp:ImageButton ID="btn_Package" runat="server" CssClass="imgTopMenu" ImageUrl="~/Img/MSbiaoqian02_1.png" />
        <asp:HiddenField ID="hidSelectType" runat="server" Value="0" />
      </div>


      <!-- this part is the top dropdown menu  of the page. -->
      <div id="dropdownMenu">
        <div id="dropdownContain">
          <div id="dropdownBack">
            <asp:ImageButton runat="server" ID="shortGown" ImageUrl="~/Img/MSbiaoqian03_2.png" CssClass="imgDropdownMenu" Width="40" Height="20" />
            <asp:ImageButton runat="server" ID="longSleeves" ImageUrl="~/Img/MSbiaoqian04_2.png" Width="40" Height="20" />
            <asp:ImageButton runat="server" ID="haveHat" ImageUrl="~/Img/MSbiaoqian05_2.png" CssClass="imgDropdownRightMenu" Width="60" Height="20" />
            <asp:ImageButton runat="server" ID="notHat" ImageUrl="~/Img/MSbiaoqian06_2.png" Width="60" Height="20" />
            <asp:ImageButton runat="server" ID="havepants" ImageUrl="~/Img/MSbiaoqian07_2.png" Width="60" Height="20" />
          </div>
        </div>
      </div>
   
   
      <!-- this part is the page link of the page. -->
      <div id="pageLinkMenu">
        <table border="0">
          <tr style="height:28px;">
            <td valign="bottom" style="padding-left:20px;" >
              <asp:ImageButton ID="sexMan" runat="server" CssClass="imgSexMenu" ImageUrl="~/Img/MSbiaoqianMEN_1.png" />
              <asp:ImageButton ID="sexWoman" runat="server" CssClass="imgSexMenu" ImageUrl="~/Img/MSbiaoqianWOMEN_1.png" />
              <asp:HiddenField ID="hidSexFlg" runat="server" Value="0" />
            </td>
            <td style="padding-left:150px;" >
              <span class="fontStyle">[第1页/共50页]&nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton ID="lkFirstPage" CssClass="pageLink" runat="server">[首页]</asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton ID="lkPrePage" CssClass="pageLink" runat="server">[上一页]</asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton ID="lkNextPage" CssClass="pageLink" runat="server">[下一页]</asp:LinkButton></span>
            </td>
            <td valign="middle" style="padding-top:5px;">
              <span class="fontStyle"><asp:Table ID="tbPageLink"  runat="server"></asp:Table></span>
            </td>
            <td>
              <span class="fontStyle"><asp:LinkButton ID="lkLastPage" CssClass="pageLink" runat="server">[尾页]</asp:LinkButton></span>
              <asp:HiddenField ID="hidCurrentPage" runat="server" Value="0" />
            </td>
          </tr>
        </table>
      </div>
     
     
      <!-- this part is the main data of the page. -->     
      <div id="mainData">
        <div id="productsList">
        <%
          for (int i = 0; i <= 9; i++)
          {
        %>         
          <div style="float:left;width:160px;margin:0 auto;height:295px;text-align:center;">
            <div style="width:133px;height:230px;">
              <img src="../../Img/MStupian011.png" width="133px;" height="230px;" alt="" />
            </div>
           
            <div style="width:160px;height:65px;">
              <div style="float:left;width:160px; height:55px;">
                <img src="../../Img/MSsetiao001.png" width="156px;" height="55px;" alt="" />
              </div>
             
              <div style="float:left; margin-top:-50px; height:55px; width:160px;">
                <div style="float:left;width:10px;">
                  <div style=" height:12px;"><img src="../../Img/MSbiaoqianNEW_2.png" width="10px;" height="10px;" alt="" /></div>
                  <div style=" height:12px;"><img src="../../Img/MSbiaoqianYS_2.png" width="10px;" height="10px;" alt="" /></div>
                  <div style=" height:12px;"><img src="../../Img/MSbiaoqianSW_2.png" width="10px;" height="10px;" alt="" /></div>
                  <div style=" height:12px;"><img src="../../Img/MSbiaoqianZB_2.png" width="10px;" height="10px;" alt="" /></div>
                </div>
                <div style="float:left;width:150px;">
                  <div style=" height:12px;"><span class="fontStyleBlack">sadfsadf</span></div>
                  <div style=" height:12px;"><span class="fontStyleBlack">sadfsadf</span></div>
                  <div style=" height:12px;"><span class="fontStyleBlack">sadfsadf</span></div>
                  <div style=" height:12px;"><span class="fontStyleBlack">RMB 133</span></div>
                </div>
              </div>
            </div>
          </div>
        <%} %> 
        </div><!-- product over -->
       
        <div id="colorSelect" >
          <asp:HiddenField ID="hidColorFlag" runat="server" Value="0" />
          <div style="float:right;"><asp:ImageButton ID="allColor" runat="server" ImageUrl="~/Img/MSsebiao12_1.png" Width="15" Height="28" /></div>
          <div style="float:right;"><asp:ImageButton ID="whiteColor" runat="server" ImageUrl="~/Img/MSsebiao11_1.png" Width="15" Height="28" /></div>
          <div style="float:right;"><asp:ImageButton ID="grayColor" runat="server" ImageUrl="~/Img/MSsebiao10_1.png" Width="15" Height="28" /></div>
          <div style="float:right;"><asp:ImageButton ID="yellowColor" runat="server" ImageUrl="~/Img/MSsebiao09_1.png" Width="15" Height="28" /></div>
          <div style="float:right;"><asp:ImageButton ID="orangeColor" runat="server" ImageUrl="~/Img/MSsebiao08_1.png" Width="15" Height="28" /></div>
          <div style="float:right;"><asp:ImageButton ID="redColor" runat="server" ImageUrl="~/Img/MSsebiao07_1.png" Width="15" Height="28" /></div>
          <div style="float:right;"><asp:ImageButton ID="pinkColor" runat="server" ImageUrl="~/Img/MSsebiao06_1.png" Width="15" Height="28" /></div>
          <div style="float:right;"><asp:ImageButton ID="deepBlueColor" runat="server" ImageUrl="~/Img/MSsebiao05_1.png" Width="15" Height="28" /></div>
          <div style="float:right;"><asp:ImageButton ID="blueColor" runat="server" ImageUrl="~/Img/MSsebiao04_1.png" Width="15" Height="28" /></div>
          <div style="float:right;"><asp:ImageButton ID="greenColor" runat="server" ImageUrl="~/Img/MSsebiao03_1.png" Width="15" Height="28" /></div>
          <div style="float:right;"><asp:ImageButton ID="deepGreenColor" runat="server" ImageUrl="~/Img/MSsebiao02_1.png" Width="15" Height="28" /></div>
          <div style="float:right;"><asp:ImageButton ID="blackColor" runat="server" ImageUrl="~/Img/MSsebiao01_1.png" Width="15" Height="28" /></div>
        </div><!-- color select over -->
       
        <div id="designer">
         
          <div style="width:100%;height:14px;margin-top:5px;">
            <div style="float:left;margin-left:20px;" onclick="downclick()">
              <img src="../../Img/MSjiantou01.png" width="24px;" height="14px;" alt="" />
            </div>
            <div style="float:right;margin-right:20px;" onclick="upclick()">
              <img src="../../Img/MSjiantou00.png" width="24px;" height="14px;" alt="" />
            </div>
          </div>
           
          <div style="overflow:hidden; width:187px; height:60px; padding:0;margin-top:45px;">
            <div id="designers" style="margin-top:0px;text-align:center;">
              <div style="width:187px;text-align:center;height:15px;"><span class="fontStyleBlack">asdfsdaf</span></div>
              <div style="width:187px;text-align:center;height:15px;"><span class="fontStyleBlack">asdfsdaf</span></div>
              <div style="width:187px;text-align:center;height:15px;"><span class="fontStyleBlack">asdfsdaf</span></div>
              <div style="width:187px;text-align:center;height:15px;"><span class="fontStyleBlack">asdfsdaf</span></div>
              <div style="width:187px;text-align:center;height:15px;"><span class="fontStyleBlack">asdfsdaf</span></div>
              <div style="width:187px;text-align:center;height:15px;background-image:url('../../Img/MSsetiao003.png');"><span class="fontStyleBlack">asdfsdaf</span></div>
              <div style="width:187px;text-align:center;height:15px;"><span class="fontStyleBlack">asdfsdaf</span></div>
              <div style="width:187px;text-align:center;height:15px;"><span class="fontStyleBlack">asdfsdaf</span></div>
              <div style="width:187px;text-align:center;height:15px;"><span class="fontStyleBlack">asdfsdafsadfsadffffffffffffffffffaaaaaaaaaaaaaaaaaaacccccccccc</span></div>
            </div>
          </div>
          <asp:HiddenField ID="hidDesigner" runat="server" Value="0" />
        </div><!--designer data over-->
        
        <!-- hot buy -->
        <div id="hotBuy">
          <div style="width:100px;margin-top:160px;">
            <asp:ImageButton ID="toHotBuy" runat="server" ImageUrl="~/Img/MSsetiao004.png" Width="187" Height="18" />
          </div>
        </div>
        
        <!-- hot List -->
        <div id="hotList">
        </div>
        
      </div><!-- mainData over -->
     
      <div style="width:100%;">
        <table border="0">
          <tr>
            <td valign="bottom" style="padding-left:154px;" >&nbsp;
            </td>
            <td style="padding-left:150px;" >
              <span class="fontStyleBlack">[第1页/共50页]&nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton ID="lkFirstPageB" CssClass="pageLinkBlack" runat="server">[首页]</asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton ID="lkPrePageB" CssClass="pageLinkBlack" runat="server">[上一页]</asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton ID="lkNextPageB" CssClass="pageLinkBlack" runat="server">[下一页]</asp:LinkButton></span>
            </td>
            <td valign="middle" style="padding-top:5px;">
              <span class="fontStyleBlack"><asp:Table ID="tbPageLinkB"  runat="server"></asp:Table></span>
            </td>
            <td>
              <span class="fontStyleBlack"><asp:LinkButton ID="lkLastPageB" CssClass="pageLinkBlack" runat="server">[尾页]</asp:LinkButton></span>
              <asp:HiddenField ID="HiddenField2" runat="server" Value="0" />
            </td>
          </tr>
        </table>
      </div>

    </div><!--show data over-->

   
    <!-- this part is right of the page. -->
    <div id="bodyRightContainer">
      <div id="rightLine"></div>
      <div id="rightLink"><span class="fontStyle">&nbsp;&nbsp;&nbsp;&nbsp;即时连接</span></div>
    </div>
   
 
  </div><!-- contain over -->
</div>

</form>
</body>
</html>

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值