1- js变量与asp变量相互调用方法 js调用asp: id='<%=变量%>'//别忘加引号 asp传js值: pp.asp?id='+id.value+' 2- javascript与asp变量互传 javascript --> asp: <script language="javascript"> i="1234567"; document.form1.num.value=i; <body> <form name="form1"> <input name="num" type="hidden"> </form> </body> <% num=trim(request.form("num")) %> asp --> javascript: <body> <% dim aa i = "1234567" %> <script language="javascript"> var a; a='<%=i%>'; alert(a); </script> </body>
|