[removed]() not working, not opening page

后端 未结 5 1379
误落风尘
误落风尘 2020-12-14 16:54

I have a submit button with a onClick:

&
5条回答
  •  没有蜡笔的小新
    2020-12-14 16:57

    Setting the location works just fine, but then the form is submitted, which will reload the current page instead.

    Return false from the method:

    function sendmail() {   
      window.location.href = "http://www.rainbowcode.net/index.php/profiles/mail?="+mailid;
      return false;
    }
    

    and return that status in the event to stop the submit:

    
    

提交回复
热议问题