http://community.csdn.net/Expert/topic/3271/3271263.xml?temp=.4378778

解决方案 »

  1.   

    用new Function("functionName(" + 参数1 + "," + 参数2  + ")")
      

  2.   

    <html xmlns:v>
    <META http-equiv=Content-Type content="text/html; charset=gb2312">
    <STYLE>
    v\:*{behavior:url(#default#VML);} //声明变量v为VML对象
    </STYLE>
    <script>
    function _onclick () {
    //do something 
      alert ('csdn')
    }
    </script>
    <body id="myvml">
    点击矩形
    </body>
    <script>
      obj_Rect = document.createElement("v:rect")
      obj_Rect.style.top=10
      obj_Rect.style.left=10
      obj_Rect.style.width = 200
      obj_Rect.style.height = 200
      obj_Rect.strokecolor="red"
      obj_Rect.strokeweight=2
      obj_Rect.onclick=_onclick
      myvml.appendChild(obj_Rect)
    </script> 
      

  3.   

    谢谢各位老大!!!
    加分!!
    不过yonghengdizhen说的我一下就用上了,所以多加一些,
    谢谢大家!!!!