The reason is that three browsers have different processing order for three properties.
Chrome Order: onclick, href-and target
IE and Firefox order: href---target---
And my need is to click on the a tag to execute a method before opening a new window.
<Divclass= "Form-group col-md-1"> <aID= "Exportbtn"href="javascript:void (0)" class= "btn btn-primary btn-block pull-right"Target= "_blank"onclick= "Addparams ();">Export orders</a> </Div>
A tag is written so that Chrome opens a window and Firefox opens two windows.
After reviewing the data, you only need to execute return false on the onclick to terminate the subsequent operation.
<Divclass= "Form-group col-md-1"> <aID= "Exportbtn"class= "btn btn-primary btn-block pull-right"Target= "_blank"onclick= "Addparams (); return false;">Export orders</a> </Div>
Can solve the problem of inconsistent behavior of two browsers, can only open a window or link correctly.
About Javascript:void (0) performance in unused browsers