ASP <div> 中的onclick 中打开链接传递后台变量值失败。。?? 10
number是后台变量。1.<divonclick="window.location.href="List.aspx?id=<%=number%>">...2.<divo...
number是后台变量。
1. <div onclick = " window.location.href ="List.aspx?id=<%=number %>">...
2. <div onclick = " window.location.href =" ‘List.aspx?id=’ +‘<%=number %>’">...
3. <div onclick = " window.location.href =" ‘List.aspx?id=’ +‘<%=number %>’+ ‘ ’">...
上面三个动作,都可以进入List.aspx,但是地址栏是List.aspx?id = %=number 2%20%,number变量值没获取到。。。 展开
1. <div onclick = " window.location.href ="List.aspx?id=<%=number %>">...
2. <div onclick = " window.location.href =" ‘List.aspx?id=’ +‘<%=number %>’">...
3. <div onclick = " window.location.href =" ‘List.aspx?id=’ +‘<%=number %>’+ ‘ ’">...
上面三个动作,都可以进入List.aspx,但是地址栏是List.aspx?id = %=number 2%20%,number变量值没获取到。。。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询