<% ... @ page contentType="text/html; charset=UTF-8" %> < script language ="javascript" > ... function click1(type,id) ...{ if(type =='' && id =='' )...{ return false; }else...{ if(type=='test')...{ var tmp=window.open('page.jsp?id=75','','width=200,height=100,resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no'); tmp.focus(); }else...{ return false; } }} </ script > < div > < button name ="button1" onclick ="click1('test',1);" > Test </ button > </ div >