[英]How do I populate a form in JSP with data obtained from a Javascript function
I have a working Javascript function manipulateData()
in a some.js file. 我在some.js文件中有一个运行中的Javascript函数handlerData
manipulateData()
。
I have included that JS file in info.jsp in head and also made it available on body load. 我已经将该JS文件包含在头部的info.jsp中,并且还使其在身体负荷时可用。 Within
manipulateData()
function, I have another function which returns that data which I want to use to populate that JSP form. 在
manipulateData()
函数中,我有另一个函数,该函数返回要用于填充该JSP表单的数据。
How can I invoke the function within a JS function from the JS file, in a JSP. 如何在JSP中从JS文件在JS函数中调用该函数。 Any help is appreciated.
任何帮助表示赞赏。
Not sure if this helps but ... 不确定是否有帮助,但是...
An inner function will only ever exist if its outer function is executed, and each execution of the outer function will create a fresh instance of that inner function. 内部函数只有在执行外部函数后才会存在,并且每次执行外部函数都会创建该内部函数的新实例。
An inner functions will cease to exist when the outer function completes unless a persistent reference to the inner function is kept, either : 除非保留对内部函数的持久引用,否则内部函数完成后,内部函数将不存在:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.