﻿
/*---------参数解释 要打开的url,num最多选择多少（window.dialogArguments），宽度，高度，给控件赋值，给隐藏域赋代码--------------------*/
function openModal(url,num,_width,_height,ctr1,ctr2,ctr3)
{
    try
    {
	    var str = showModalDialog(url,num,"dialogHeight:"+_width+";dialogWidth:"+_height+";edge:raised;center:yes;help:no;resizable:yes;status:no;"); 
	    var all = str.split('$');

	    document.getElementById(ctr1).innerHTML=all[0];//文本值   lable对应的是innerText

	    document.getElementById(ctr2).value=all[1];//value值
	    if(ctr3!=null)//没传值
	    {
	        document.getElementById(ctr3).value=all[0];
	    }
	    return false;
	}
	catch(e)
	{
	//防止直接关闭IE产生的异常。
	}
}