showModalDialog的使用

发布时间:2020-07-09 14:44:19 作者:houqida
来源:网络 阅读:548

showModalDialog的合理使用会加速你程序的开发,下面我把我的代码贴出来分享

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@	taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.01 Transitional//EN">
<html>
<head>

<%@ include file="noCache.jsp"%>
<link rel="stylesheet" type="text/css" href="css/content.css">
<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="js/jquery.datepick.js"></script>
<script type="text/javascript" src="js/jquery.datepick-zh-CN.js"></script>
<link href="css/jquery.datepick.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	$(document).ready(
			function() {
				$("#ck").click(
						function() {
							$("[name='pageForm']").attr("action",
									"CustomerAction_toaddBzwzchuku");
							$("[name='pageForm']").submit();
						});
			});
	// 时间选择器
	$(document).ready(function() {
		
		$("#dateinput2").datepick({
			dateFormat : 'yy-mm-dd'
		});
		$("#dateinput1").datepick({
			dateFormat : 'yy-mm-dd'
		});
	});
</script>
</head>
<body>
	<div id="biaoti" class="tbtitle01">
		<b>前台登记修改审计查询</b>
	</div>
	<div class="space_h_10"></div>
	<s:form action="SampleAction_selectSampleshenji" name="pageForm" method="post">
		起始时间:<s:textfield name="sj.time1" id="dateinput1"></s:textfield>
		终止时间:<s:textfield name="sj.time2" id="dateinput2"></s:textfield>
		<s:submit value="查询"></s:submit>
	<table width="100%" border="0" cellpadding="6" cellspacing="0"
		class="tb_list1">
		<tr>
			<th>序号</th>
			<th>样品号</th>
			<th>报告号</th>
			<th>修改人</th>
			<th>修改时间</th>
<!-- 			<th>修改内容</th> -->
			<th>查看详细</th>
			
		</tr>
		<s:iterator value="#request.sampleshenjilist" status="st">
			<tr>
				<td ><s:property value="#st.index+1" /><input type="hidden" name="" value="${id }"/></td>
				<td><s:property value="sample_number" /></td>
				<td><s:property value="text_id" /></td>
				<td><s:property value="name" /></td>
				<td><s:property value="time" /></td>
<!-- 				<td><s:property value="content" /></td> -->
				<td ><a href="#" onclick="queryDetail('<s:property value="id" />')">查看详细</a></td>
				
			</tr>
		</s:iterator>
	</table>
<!-- 	<input type="button" value="出库" id="ck"/> -->
	${page }
	</s:form>
	<script type="text/javascript">
		function queryDetail(value){
			var url = "SampleAction_selectShenjiXiangxi?id="+value;
			window.showModalDialog(url,"view","dialogWidth=550px;dialogHeight=600px");
		}
	</script>
</body>

</html>

基本介绍:
          showModalDialog()         (IE 4+ 支持)
          showModelessDialog()      (IE 5+ 支持)
          window.showModalDialog()                  方法用来创建一个显示HTML内容的模态对话框。
          window.showModelessDialog()             方法用来创建一个显示HTML内容的非模态对话框。
使用方法:
          vReturnValue = window.showModalDialog(sURL [, vArguments] [,sFeatures])
          vReturnValue = window.showModelessDialog(sURL [, vArguments] [,sFeatures])
参数说明:
         sURL          --  必选参数,类型:字符串。用来指定对话框要显示的文档的URL。
         vArguments    -- 可选参数,类型:变体。用来向对话框传递参数。传递的参数类型不限,包括数组等。对话框通过
 

                          window.dialogArguments来取得传递进来的参数。
         sFeatures     -- 可选参数,类型:字符串。用来描述对话框的外观等信息,可以使用以下的一个或几个,用分号“;”隔开。
----------------
1.    dialogHeight:    对话框高度,不小于100px
2.    dialogWidth:    对话框宽度。
3.    dialogLeft:     离屏幕左的距离。
4.    dialogTop:     离屏幕上的距离。
5.    center:          { yes | no | 1 | 0 } :              是否居中,默认yes,但仍可以指定高度和宽度。
6.    help:             {yes | no | 1 | 0 }:                是否显示帮助按钮,默认yes。
7.    resizable:       {yes | no | 1 | 0 } [IE5+]:     是否可被改变大小。默认no。
8.    status:          {yes | no | 1 | 0 } [IE5+]:      是否显示状态栏。默认为yes[ Modeless]或no[Modal]。
9.    scroll:            { yes | no | 1 | 0 | on | off }:是否显示滚动条。默认为yes。


推荐阅读:
  1. AccessibilityService的使用
  2. Spinner的基本使用

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

showmodaldialog dal

上一篇:[cocos2d-x]在windows下创建cocos2d-x程序[important]

下一篇:HTML相关的基础知识点有哪几个

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》