How to copy one form elements into another through jsp?
I want to copy one f开发者_运维问答orm elements into another
<a href="#" onClick="copySelectedOptions(document.forms[0]['lstusr'],document.forms[0]['lstto'],false);return false;">
It is already written in PHP. I want it in JSP.
Your example means that you wish to copy form elements on client side. In this case the question about PHP or JSP is irrelevant: they both are server side technologies. So, just find the function copySelectedOptions
implemented in javascript you used before (probably with PHP on server side that does not matter), include it into your HTML using <script>
tag and use it.
First of all, I don't see how this becomes a Java / JSP / Servlet question. The copySelectedOptions
function is a JavaScript function and can be easily reproduced by copying and pasting into your JSP file.
精彩评论