<div style="onmouseout:hello()"></div>
没有这样的用法,应该是:
<div onmouseout="hello()"></div>如果将div改为服务器控件Panel,可以在Page_Load中为它添加onmouseover事件,象这样:Panel1.Attributes.Add("onmouseover","hello()");

解决方案 »

  1.   

    赫赫。。谢谢各位。我因为是.net的新手。所以这个事情不太清楚。现在回了。就像陕北的兄弟说的那样。我的意思是做一个在网页上的停靠栏的冬冬。现在具体代码如下,大家可以看看:
       <tvns:treeview id="TreeView1" OnMouseOver="hello()" imageUrl="./image/icon_folder.gif" selectedNodeIndex="0" HelperID="__TreeView1_State__" systemImagesPath="/webctrl_client/1_0/treeimages/" onexpand="javascript: if (this.clickedNodeIndex != null) this.queueEvent('onexpand', this.clickedNodeIndex)" oncollapse="javascript: if (this.clickedNodeIndex != null) this.queueEvent('oncollapse', this.clickedNodeIndex)" oncheck="javascript: if (this.clickedNodeIndex != null) this.queueEvent('oncheck', this.clickedNodeIndex)" onselectedindexchange="javascript: if (event.oldTreeNodeIndex != event.newTreeNodeIndex) this.queueEvent('onselectedindexchange', event.oldTreeNodeIndex + ',' + event.newTreeNodeIndex)" onfirequeuedevents="javascript: window.setTimeout('__doPostBack(\'TreeView1\',\'\')', 0, 'JavaScript')" style="border-style:Ridge;height:352px;width:328px;Z-INDEX: 108; LEFT: 440px; POSITION: absolute; TOP: 0px">
    <tvns:treenode Selected="true">
    FldFtp<tvns:treenode NodeData="g:\">
    incoming
    </tvns:treenode>
    </tvns:treenode>
    </tvns:treeview></FONT>
        Panel1.Attributes.Add("onmouseover","hello()");
         <script language="vbscript">
      dim i
      i=0
      sub hello
          i=i-1
          if i>-100 then 
          settimeout "hello",5
          Treeview1.style.top=i
          end if
      end sub
      
      
    </script>