如何用js给<form name="" method="" action="">里的action赋值啊???

解决方案 »

  1.   

    document.getElementById('form').setAttribute('action','http://www.baidu.com');
      

  2.   


    document.getElementById('formid').action="http://www.google.com";
      

  3.   

    id从哪儿来的 那是form标签 没有id 能用getElementById吗
      

  4.   


    document.getElementById('form').action = 'http://www.baidu.com';;
      

  5.   

    用JQuery
    $("form")[0].attr("action","123.jsp");
      

  6.   

    1.document.getElementsByTagName("form")[0].action = 'http://www.baidu.com';
    2.document.getElementById('form').setAttribute('action','http://www.baidu.com');
    3.document.getElementById('form').action = 'http://www.baidu.com';;多了