用 obj.onmouseover(); 试试看。<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
  <title>试试</title>
</head><style type="text/css">
#txt {
  width: 100px;
  height: 50px;
  border: 1px solid black;
}
</style><script type="text/javascript">
window.onload = function() {
  var t = document.getElementById('txt');
  t.onmouseover();
}
</script><body>
  <div id="txt" onmouseover="alert('abc')">
  abadfasw
  </div>
</body>
</html>

解决方案 »

  1.   

    不是这个意思,其实就是我在其他过程中触发mouseover事件
      

  2.   

    其他过程中,加一个事件,,,,你设置你这个Flash的响应方式即可
      

  3.   


    <script type="text/javascript">
        function f()
        {
            var t = document.getElementById('txt');
            t.onmouseover(); 
        } 
    </script><body>
        <div id="txt" onmouseover="alert('abc')">
            abadfasw
        </div>
        <button id="btn1" onclick="f()">click</button>
    </body>
      

  4.   

    我在SVG中定义了动画,其中动画的begin赋值为mouseover,当我把鼠标移动到动画对象上时,动画开始运动。但我向在程序中调用动画,所以想在其它地方引发onmouseover事件,但我用js在程序中obj.onmouseover()后动画无任何反应。不知为何?
      

  5.   


    <html>
    <script type="text/javascript">
    var timer=null
    function move(){
    document.getElementById("d").style.left=parseInt(document.getElementById("d").style.left)+5
    }
    function moveStart(){

    if(timer==null)
    timer=setInterval("move()",100)
    }
    function moveStop(){
    if(timer!=null)
    clearTimeout(timer)
    timer=null
    }
    </script><body>
      <div id="txt" onmouseover="moveStart()" onmouseout="moveStop()">
       鼠标移上来试试
      </div>
      <div id="d" style="position:absolute;left:100px;top:200px;background-color:Red">sdfsdsd</div>
      <input type="button" onclick="document.getElementById('txt').onmouseover()" value="开始">
       <input type="button" onclick="document.getElementById('txt').onmouseout()" value="停止">
    </body>
    </html>
      

  6.   

    偷赖,只写了针对IE的<!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> 
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
    </head> <body> 
    <div id="demo" style="background-color:#eee; border:1px solid #ccc;"> 
        <a href="#">This is a link </a> 
        <span>This is a plain text </span> 
        <img src="../../JS/practice/20070120114354739.jpg" width="200" height="150"/> 
    </div> 
    <script type="text/javascript" language="javascript"> 
    document.getElementById("demo").onmouseover = function(mEvent){ 
    var obj; 
    if (typeof(event) != "undefined"){ // 判断是否为IE浏览器 
    obj = event.srcElement;
    }else{ 
    obj = mEvent.target; 
    }  var o = window.event.fromElement;
    while( o ){
    if( o == document.getElementById("demo")){
    o = window.event.toElement;
    while( o ){
    if( o == document.getElementById("demo")){
    return;
    }
    o = o.parentNode;
    }
    break;
    }
    o = o.parentNode;
    }
    alert("Mouse over"); 

    </script> 
    </body> 
    </html> 
      

  7.   

    <script type="text/javascript">
    window.onload = function() {
      var t = document.getElementById('txt');
      t.onmouseover();
    }
    </script>
    正解~!·1
      

  8.   

    那你要做的事情写在匿名方法内,然后bind就可以,ok