现在的位置: 首页 > 综合 > 正文

struts传值小点

2013年08月08日 ⁄ 综合 ⁄ 共 1067字 ⁄ 字号 评论关闭
function TypeInfoList(id){
			$.window.prepare({
				   dock: 'left'     // change the dock direction: 'left', 'right', 'top', 'bottom'
				});
			$.window({
				title: "检验项目选择",
				showFooter: false,
				maximizable:true,
				bookmarkable:false,
				width:700,
				height:220,
				x:-1,
				y:-1,
				createRandomOffset : {
					x : -1,
					y : -1
				},
				resizable:false,
				showRoundCorner: true,
				modalOpacity: 0.5,
				showModal: true,
				closable: true,
				minimizable:false,
				url: appConfig.contPath+"/receive/wt09/trialwt09!windows.action?inputTypeId=" + id
			});	

ACTION========================================

String inputTypeId;
	public String getInputTypeId() {
		return inputTypeId;
	}

	public void setInputTypeId(String inputTypeId) {
		this.inputTypeId = inputTypeId;
	}

	public String windows() {
		System.out.println("id="+inputTypeId);
		return "windows";
	}

接收=====================================

<script type="text/javascript">
	function returnType() {
		var d = document, items = d.getElementsByName("ord"), str = "";
		for ( var i = 0; i < items.length; i++) {
			if (items[i].checked ) {
				str = str + items[i].value ;
			}
		}
		if (str == "") {
			alert('请选择要操作的对象!');
			return false;
		}
		$(window.parent.getCodeName('<s:property value="inputTypeId"/>', str));
		$(window.parent.close());

	}
</script>

抱歉!评论已关闭.