fds
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'save.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<link rel="Stylesheet" type="text/css" href="css/jquery.jmodal.css" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery.jmodal.js"></script>
<style type="text/css">
body,html
{
font-family:Calibri;
font-size:12px;
height:1000px;
line-height:18px;
}
</style>
</head>
<script type="text/javascript">
$(document).ready(function() {
$("#absolute").click(function() {
$.fn.jmodal({
data: { innerText: $(this).text() },
title: 'Dialog Title',
content: 'I am always fixed in the middle of screen(just scroll)!<br/>I am always fixed in the middle of screen(just scroll)!<br/>I am always fixed in the middle of screen(just scroll)!<br/>',
buttonText: { ok: 'OK', cancel: 'Cancel' },
fixed: true,
okEvent: function(obj, args) {
alert(obj.innerText);
args.complete();
}
});
});
$('a.absolute').click(
function() {
$.fn.jmodal({
title: 'Dialog Title',
content: 'I am a absolute dialog!<br/>I am a absolute dialog!<br/>I am a absolute dialog!<br/>',
buttonText: { ok: 'OK', cancel: 'Cancel'},
okEvent: function(obj, args) {
args.complete();
}
});
}
);
$().click(function() {
$.fn.jmodal({
title: 'Dialog Title',
content: function(e) {
e.html('loading...');
e.load('template/msn.htm');
},
buttonText: { ok: 'OK', cancel: 'Cancel' },
okEvent: function(obj, args) {
args.complete();
}
});
});
})
function vilidate(){
var Obj = document.getElementById("iddd").value;
if(Obj==''){
diageTitle();
return false;
}
}
function diageTitle(){
$.fn.jmodal({
title: 'xx医院提示您!',
content: '请输入检索条件!并在下拉菜单中选择你要搜索的范围,如果您选择的是专家最好输入专家的部分姓名!',
buttonText: { ok: '确定', cancel: '取消'},
okEvent: function(obj, args) {
args.complete();
}
});
}
</script>
<body>
<h1><font color="red">Save User</font></h1>
<s:form action="saveUser" οnsubmit="return vilidate()">
<s:textfield name="user.firstname" label="first name" id="iddd" ></s:textfield>
<s:textfield name="user.lastname" label="last name"></s:textfield>
<s:textfield name="user.age" label="age"></s:textfield>
<s:submit value="submit" id="absolute"></s:submit>
</s:form>
<li><a href="javascript:void(0)" class="absolute55555" >absolute dialog</a></li>
</body>
</html>