使用XMLDOM 装载进来,可以动态去取服务器数据,但不会导致页面刷新。
如果将全部数据取出放入客户端,编写起来相当繁琐。

解决方案 »

  1.   

    这样要将数据库要用到的数据下载到客户端来用javascript来实现,如果数据量不大这种方法是最好的
      

  2.   

    ingernew() :如何用javascript实现呢?
      

  3.   

    http://lucky.myrice.com/javascriptexam/index.html
    <html>
    <HEAD>
    <title>例子</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><SCRIPT LANGUAGE="JavaScript">
    var meng1Array =  new Array("('选择Heha.net栏目内容','',true,true)",
    "('学习 XML')",
    "('学习 Javascript')",
    "('学习 PHP')");
    var mengArray =  new Array("('选择Myrice.com栏目内容','',true,true)",
    "('学习 Flash')",
    "('学习 Dreamweaver Ultradev')",
    "('学习 Java')");
    var meng2Array =  new Array("('选择China.com栏目内容','',true,true)",
    "('查找歌词')",
    "('其他')");function populatemxhweb(inForm,selected) {
    var selectedArray = eval(selected + "Array");
    while (selectedArray.length < inForm.mxhweb.options.length) {
    inForm.mxhweb.options[(inForm.mxhweb.options.length - 1)] = null;
    }
    for (var i=0; i < selectedArray.length; i++) {
    eval("inForm.mxhweb.options[i]=" + "new Option" + selectedArray[i]);
    }if ( navigator.appName == 'Netscape') {
    if (parseInt(navigator.appVersion) < 4) {
    window.history.go(0);
    }}
    //以下不影响}</script>
    <link rel="stylesheet" href="../css/css.css" type="text/css">
    </head><body topmargin="0" leftmargin="0" marginweight="0" marginheight="0"  bgcolor="#0099FF" oncontextmenu="return false;"><p>&nbsp;</p>
    <font color="#000066">说明:适用于IE4,IE5.5,IE5,NS4+,NS6。早期版本的IE5.0可能无法工作。</font> 
    <center>
    <form name="globe">
    <table width="80%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>
    <select  onChange="populatemxhweb(document.globe,this.options[selectedIndex].value)">
    <option value="meng">http://lucky.myrice.com
    <option value="meng1">http://go.163.com/colorweb
    <option value="meng2">http://egirl.51.net
    </select>
    </td>
    <td>
    <select name="mxhweb" onChange="window.open('http://egirl.51.net')">
    <option value=''>☆ 请选择上面的选项 ☆</option>
    </select>
    </td>
    </tr>
    </table>
    </form>
    </center>
    </body>
    </html>
      

  4.   

    将数据取出放入DataTable
    将页面的smartNavigation 设为True就可以了
    <%@ Page language="c#" Codebehind="test.aspx.cs" AutoEventWireup="false" Inherits="Omnicare.EMSSystem.Web.test" smartNavigation="True"%>
      

  5.   

    这是两连动的,三连动在这个理解的基础上就很简单能够实现,如需要我再找给你            
    <script language=JavaScript lanuage="JScript">
    <!--
    function turnit(ss)  {
    cc = new Array();
        cc[0] = Content1;
        cc[1] = Content2;
    cc[2] = Content3;
    cc[3] = Content4;
    cc[4] = Content5;
    cc[5] = Content6;
        cc[6] = Content7;
        ccLen = 6;
    ss.style.display="";
    for (i=0;i<=ccLen;i++) {
    if(cc[i] != ss) cc[i].style.display="none";
    }
    }function turnit1(ss,c1)  {
    ss.style.display="";
    c1.style.display="none";
    }
    // -->
        </script>
                    </font><a href="Store.asp" target="mainFrame">库存项目</a></TD>
              </TR>
              <TR> 
                <TD width=130 align=middle bgcolor="#FFFFFF" id=Content1 style="font-size: 9pt"> 
              <form name="form1" method="post" action="Store.asp" target="mainFrame">
                    <select name="Store" id="Store" onChange=changelocation(document.form1.Store.options[document.form1.Store.selectedIndex].value)>
                      <option value="">选择仓库</option>
                       <option value='AM'  >AM</option><option value='PM'  >PM</option><option value='FPP'  >FPP</option>
                    </select>
                    <script language="JavaScript">
    Subcat=new Array()
    Subcat[0]=new Array('AM','01');Subcat[1]=new Array('FPG','01');Subcat[2]=new Array('FPP','白铜');Subcat[3]=new Array('FPP','钢料');Subcat[4]=new Array('FPP','红铜');Subcat[5]=new Array('FPP','记忆金属');Subcat[6]=new Array('FPP','加硬白铜');Subcat[7]=new Array('FPP','锰料');Subcat[8]=new Array('FPP','其它');Subcat[9]=new Array('FPP','钛(半)');Subcat[10]=new Array('FPP','钛β');Subcat[11]=new Array('FPP','钛记忆');Subcat[12]=new Array('FPP','钛料');Subcat[13]=new Array('PM','01');Subcat[14]=new Array('TL','01');
    var Count1=15;function changelocation(tolocationid)
        {

    document.form1.Bin.length =1; 

        var t;
        for (t=0;t < Count1; t++)
            {
                if (Subcat[t][0] == tolocationid)
                { 

                    document.form1.Bin.options[document.form1.Bin.length] = new Option(Subcat[t][1], Subcat[t][1]);
                }        
            }
            
        }        
       </script>
                    <select name="Bin" id="Bin">
                      <option value="">选择仓位</option>
                    </select>
                    <input name="PartsID" type="text" class="editbox2" id="PartsID" size="15"> 
     <input type="checkbox" name="checkbox" value="checkbox">
                  需采购  <input name="Submit" type="submit" class="button1" value="库存查询">
                    <input type="button" name="Submit3" value="报表" onClick="javascript:window.open('PrintSel.asp','','toolbar=yes,scrollbars=yes,width=1,height=1,top=300,left=300,');">
                  </form>
      

  6.   

    echoofice(echo) 
    先赋值到一个隐藏域里,然后操作。网上例子很多,一搜一大把
      

  7.   

    coo_key(cookey) :什么是隐藏域?
    不是应该先把数据下载到本地然后再传给js吗?
    我现在就是不太清楚如何把数据传给js
      

  8.   

    asp.net有一个web服务,支持页面内部分控件刷新,大家何不研究一下这个?