据他描述,就是 a.action=functionA这样用时出错!

解决方案 »

  1.   

    把action元素改id和name~~~~~~然后……
      

  2.   

    form1.action="xxx.cgi";
    form1.elements["action"].value = "xxxx";
      

  3.   

    <!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>
    </head><body>
    <form action="Untitled-1.html" name="form1"><input type="text" name="action" /></form></body>
    </html>
    <script type="text/javascript">
    var oF = document.form1;alert(oF.attributes.getNamedItem("action").nodeValue);oF.attributes.getNamedItem("action").nodeValue = "Untitled-2.html";alert(oF.attributes.getNamedItem("action").nodeValue);</script>