通常在一个网页上输入用户名和密码登陆,就可与数据库交互!
我现在想用WebBrowser控件打开网页(将他隐藏),用普通窗体方式(Name文本控件,PWD文本控件)登录实现与远程数据库交互,请问怎样将他与网页上登录事件关联!

解决方案 »

  1.   

    这个不难啊,你直接控制webbrowser1.document对象就可以了啊
    就象进行dhtml编程一样
      

  2.   

    Dim Doc As IHTMLDocument2
        Set Doc = WebBrowser1.Document
        Doc.All.Item("UID").Value = Text1.Text
        Doc.All.Item("Pwd").Value = Text2.Text
    可我这样不行啊,我这个页面有两个文本域叫"UID"和"Pwd",我怎么让在窗体上点击“确定”让他和页面上点击“登陆”实现一个功能?
    这个WebBrowser1.Document具体怎么用,能给我讲讲他吗?
      

  3.   

    下面网页代码上的鼠标点击事件是什么?怎么没有onMouseDowna啊?那我鼠标点击触发那里呢?
    <form id="frm<%=i%>">
    <table align="left" bgcolor="#FFFFFF" width="90" cellpadding="0" cellspacing="0" border="0" style="font-size:10 pt;color:#000000" onMouseOver="this.style.background='#EBF4FA'" onMouseOut="this.style.background='#FFFFFF'"  style="cursor:hand"
    <tr>
    <td width="80" align="center"><a href = 'rapp://<%
    dim szRunApp,szUrl
    szUrl=Request.ServerVariables("http_host")'&":"&Request.ServerVariables("SERVER_PORT")
    szRunApp="/distill:"& Session.SessionID & _
    "/url:"&szUrl & _
    "/username:"&Session.Contents("UID") &_
    "/password:"&Session.Contents("PWD") & _
    "/pid:"&rs("PID")
    Dim encode
    Set encode = Server.CreateObject("CTBS.base64")
    encode.Encode64(szRunApp)
    Set encode = nothing
    %>'>
    <img src="ico/<%=rs("icopath")%>" title="<%=rs("contents")%>" border="0">
    </td>
    </tr>
    <tr>
    <td width="80" align="center">
    <%=rs("PName")%>
    </td>
    </a>
    </tr>
    </table>
    </form>
      

  4.   

    直接form.submit就好了啊
    不过你贴出来的form的名字还是动态的,无从知道怎么从document找到form就是了
      

  5.   

    Dim Doc As IHTMLDocument2
    Set Doc = WebBrowser1.Document
    我怎么通过Doc的一些属性等找到form啊?Doc的那个属性代表他?
      

  6.   

    根据名字或者序号访问document.all集合