分解一下你的问题:
1、TEXT1的onblur事件,将TEXT1所在的form提交(formName.submit());
2、数据库处理(略),返回TEXT1、TEXT2、TEXT3应该有的值;
3、TEXT1、TEXT2、TEXT3 值的回写;如果是JSP,<input name=text1 value=<%=resultSet.get(略)%>>

解决方案 »

  1.   

    我觉得要不想提交就得到的话,要在引入一个页面.比如用
    <script src="" language="javascript" id="pro"></script>1,onBlur --> document.getElementById('pro').src='xxx.asp?val='+this.value;而在xxx.asp可以根据传过来的val值进行查询.输出js代码
    2,在当前页面显示刚才输出的js代码
      

  2.   

    你好,ccterran(iwind) ,能告诉我具体怎么写吗?
    我对这个JAVASCRIPT不懂的!
      

  3.   

    你用的是什么程序?我只会写js+PHP的...
      

  4.   

    只能给你一个简单的例子吧,思想就是把index.htm的值传到index.asp,在index.asp分析数据,提取数据库中的值,然后index.htm就可以使用这个值index.htm
    ---------------------------------------------
    <script src="" id="sub" language="javascript"></script>
    <form name="form1">
    <input type="text" name="text1" onBlur="document.getElementById('sub').src='index.asp?id='+this.value">
    <br>
    <input type="text" name="text2" id="text2">
    </form>
    index.asp
    ------------------------------
    <%
    response.write("document.form1.text2.value='从index.asp中得到的值:"+request("id")+"';")
    %>
      

  5.   

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function getCount() {
    var rs = new ActiveXObject("ADODB.Recordset");
    var url = window.document.location.toString();
    url = url.substr(url,url.lastIndexOf("/")) + "/GetData.asp?Text1=" +  escape(document.getElementById("Text1").value);
    rs.Open(url);
    if (!rs.EOF) {
    document.getElementById("Text2").value = rs("Text2");
    document.getElementById("Text3").value = rs("Text3");
    }
    }//-->
    </SCRIPT>
    <!--GetData.asp-->
    <%@ Language=VBScript %>
    <!-- #Include file="inc/ADOVBS.INC" -->
    <%
    dim rec
    dim conn'数据库连接 set rec = Server.CreateObject("Adodb.Recordset")
    set conn = Server.CreateObject("Adodb.Connection")
    dim strSQL conn.open "<连接串>"
    strSQL = "select Text2,Text3 from TableName where Text1 = ' & Request.QueryString("Text1") & '"
    rec.CursorLocation = 3
    rec.Open strSQL,conn
    Response.ContentType = "text/xml"
    Response.Write "<?xml version='1.0' ?>" & vbCrLf
    rec.Save Response,1
    set rec = nothing
    set conn = nothing
    Response.End
    %>
      

  6.   

    rinco(天才白痴) 你写的程序能解释一下么???我看你是真白吃了!
      

  7.   

    可以用XMLHTTP实现.demo.htm<script>
    function getTotal()
    {
        var oBao = new ActiveXObject("Microsoft.XMLHTTP");
    oBao.open("POST","check.asp?typeid="+document.all.typeid.value,false);
    oBao.send();
    document.all.maxtype.value=(oBao.responseText);
    }
    </script>
    <input type=text name="typeid">
    <input type=text name="maxtype">
    <input type=button onclick="getTotal()">
    check.asp<!--#include file="conn.asp"-->
    <%
    Dim typeid
    typeid = Request.QueryString("typeid")
    set rs = Server.CreateObject("ADODB.Recordset")
    sql="SELECT maxtype from maxtype where id="&typeid
    rs.open sql,conn,1,1
    do while not rs.eof
    If IsNull(rs("maxtype")) Then
    Response.Write "0"
    End If
    Response.Write rs("maxtype")
    rs.movenext
    loop
    rs.close
    set rs = nothing
    conn.close
    set conn = nothing
    %>conn.asp<%
    dim conn
    dim connstr
    on error resume next
    connstr="DBQ="+server.MapPath("data.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
    set conn=server.CreateObject("ADODB.CONNECTION")
    conn.open connstr
    %>data.mdb数据库
    maxtype表,
    有id,maxtype字段.
      

  8.   

    wanghr100(灰豆宝宝.net) ,你好为什么文字显示出来是“?”,数字显示是正常的,你能不能帮我看一下!
      

  9.   

    demo.htm
    因为,中文的原因...
    以下可以解决.<script language="vbscript">
    Function bytes2BSTR(vIn)
    Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,NextCharCode
    strReturn = ""
    For i = 1 To LenB(vIn)
    ThisCharCode = AscB(MidB(vIn,i,1))
    If ThisCharCode < &H80 Then
    strReturn = strReturn & Chr(ThisCharCode)
    Else
    NextCharCode = AscB(MidB(vIn,i+1,1))
    strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
    i = i + 1
    End If
    Next
    bytes2BSTR = strReturn
    End Function
    </script>
    <script>
    function getTotal()
    {
        var oBao = new ActiveXObject("Microsoft.XMLHTTP");
    oBao.open("POST","check.asp?typeid="+document.all.typeid.value,false);
    oBao.send();
    document.all.maxtype.value=bytes2BSTR(baoHttp.responseBody);
    }
    </script>
    <input type=text name="typeid">
    <input type=text name="maxtype">
    <input type=button onclick="getTotal()">
      

  10.   

    从服务器端取值并更回填到页面(showModelessDialog方式)
    http://jkisjk.vip.sina.com/html/getDataFromServer.htm