How to open a new window on form submit

后端 未结 9 1917
说谎
说谎 2020-11-29 22:36

I have a submit form and want it to open a new window when users submits the form so i can track it on analytics.

Here is the code I\'m using:



        
9条回答
  •  时光取名叫无心
    2020-11-29 23:16

    The code you have given, needs to be corrected. In form tag you have to enclosed the onClick attribute value in double quote:

    "window.open('google.htm','','scrollbars=no,menubar=no,height=600,width=800,resizable=yes,toolbar=no,status=no');"

    You also need to take care that first parameter of window.open should also be enclosed using quotes.

提交回复
热议问题