jquery重写友好提示对话框

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>

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值