4种get方法传参

< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" />
   < title > title >
   < script type = "text/javascript" >
     function Go() {
       window.location.href="localhost:21811/Handler1.ashx?id=1&name='abc'"
     }
   script >
head >
< body >
  
  
  
   localhost:21811/Handler1.ashx?id=1&name="abc"
  
  
  
   < a href = "localhost:21811/Handler1.ashx?id=1&name='abc'" >超链接传递参数 a > body >
  
  
   < input type = "button" onclick = "Go()" value = "通过js方法传递参数" />
  
    
  
   < form action = "Handler1.ashx" method = "get" > >
     < input type = "text" name = "id" value = "3" />
     < input type = "text" name = "name" value = "abc" />
     < input type = "submit" value = "通过传递参数" />
   form >
body >
html >

你可能感兴趣的:(参数解决)