js 弹出框

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path= request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>弹出框</title>
<script type="text/javascript" src="<%=path%>/js/Dialog.js"></script>
<script type="text/javascript">
function checkLog(){
var diag = new Dialog("Diag1");
diag.ImagePath = '<%=path%>/images/dialog/';
diag.Width = 300;
diag.Height = 150;
diag.Title = "弹出的窗口";
//diag.okvalue="保 存"; //用来修改默认值!
diag.innerElementId="hello";
diag.OKEvent = function(){
diag.close();
};//点击确定后调用的方法
diag.show();
}
</script>
<link href="<%=path %>/css/global.css" rel="stylesheet" type="text/css" id="styleCss">
</head>

<body>
<br><br><br><br><br>
<a href="#" onclick="checkLog()">点击弹出</a>
<input type="button" value="点击弹出"  onclick="checkLog()"/>
<div id="hello" style="display:none">hello World!</div>
</body>
</html>

你可能感兴趣的:(html,css)