<!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" />  
<title>文档  </title>
<script>
function Canble(){
document.getElementById('txt').onmouseover();}
</script>
</head>  <body >  
<input type="text" id="txt" onmouseover="alert('aaa');" /> <input type="button" onclick="Canble()" /> </body>  
</html>  

解决方案 »

  1.   

    IE下?如果是firefox opera 下可以这样 
    <input type="text" id="txt" onmouseover="alert('aaa');" /> <input type="button" id='btn' value='test' /> document.getElementById('btn').onclick=document.getElementById('txt').onmouseover;
      

  2.   

    <BODY>
    <form method="post" action="">
    <input type="text" id="txt" onmouseover="alert('aaa');" onclick="alert('ddd')" />
    <input type="button" onclick="document.getElementById('txt').onmouseover();" /> 
    </form>
    </BODY>
      

  3.   

    只要你明白onmouseover事件,你就会明白的,很简单和事情,。