javascript 实现页面间传值

$,是指prototype定义的一类方法

$("id")  得到的是页面id为"id"的元素
$F("id") 得到的是页面id为"id"的元素的值,这是只读的,不可写

1. var str = window.showModalDialog(url, window, "dialogHeight: " + h + "; dialogWidth: " + w + ";

                                                       dialogTop: 200px; dialogLeft: 250px; edge: Raised; center: Yes;

                                                       help: Yes; resizable: Yes; status: no;scroll:no");
          
            if (str != 'no' && str != null)

           {
                var strs=str.split("+");
              
                document.all.<%=txtCUSTOMERSNO.ClientID%>.value=strs[0];
                document.all.<%=txtCUSTOMERSNAME.ClientID%>.value=strs[1];;
               
                $("#<%=txtCUSTOMERSLEVEL.ClientID%>").val(strs[2]);
               
               
                document.all.<%=txtCUSTOMERSADDRESS.ClientID%>.value=strs[3];;
            }

2. window.returnValue=var1;

     window.Close();

 

你可能感兴趣的:(JavaScript)