onclick事件实例

来源:互联网 发布:爆破网络连线 编辑:程序博客网 时间:2024/06/05 07:35
 
<%@ 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>
原创粉丝点击