JS 페이지 값 전달

3411 단어 js
 <script type="text/javascript">

    function GetValue()

    {

       var url=location.search;

       var Request = new Object();

       if(url.indexOf("?")!=-1)

       {     

           var str = url.substr(1)   //  ?   

           strs = str.split("&");    

           for(var i=0;i<strs.length;i++)   

           {        

             Request[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);   

           }

           document.getElementById("<%= txtEmpNo.ClientID %>").value=Request['No']; 

           document.getElementById("<%= txtDate.ClientID %>").value=Request['Date'].replace(/[\/]/g, "-"); 

       }

     }



    </script>

 
// <![CDATA[
function GetValue()
{
var url=location.search;
var Request = new Object();
if(url.indexOf("?")!=-1)
{
var str = url. substr (1) / 제거? 번호
strs = str.split("&");
for(var i=0;i<strs.length;i++)
{
Request[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
}
document.getElementById("<%= txtEmpNo.ClientID %>").value=Request['No'];
document.getElementById("<%= txtDate.ClientID %>").value=Request['Date'].replace(/[\/]/g, "-");
}
}
// ]]>

좋은 웹페이지 즐겨찾기