[英]how to use javascript variable inside scriptlet tag
I want to pass a javascript variable to a scriptlet tag. 我想将JavaScript变量传递给scriptlet标签。 below is my code, i am using scriptlet tags inside a jsp page:
以下是我的代码,我在jsp页面内使用scriptlet标签:
<script>
function concur(look){
alert(look);
<%
String lk=request.getParameter("look");
con.writing("HeyWow ",lk);%>
</script>
i want to pass the value of the string 'look' as an argument to the function 'writing'. 我想将字符串“ look”的值作为参数传递给函数“ writing”。
can anyone tell me how to do this ? 谁能告诉我该怎么做?
thanks 谢谢
This question and answers may help you. 该问题和解答可能会对您有所帮助。 It was asked by me earlier today :)
这是我今天早些时候问的:)
Javascript variable in asp block code ASP块代码中的Javascript变量
Good luck! 祝好运!
您必须将表单作为普通的提交过程或通过ajax调用提交给服务器,只有在此之后才能访问请求中的变量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.