开发者

How to write this in jsp page?

I want to write this code in jsp....Please help me

<td width="28" align="center">  
  <a href="#" onClick="copySelectedOptions(document.forms[0]['lstusr'],document.forms[0]['lstto'],false);return false;"><strong>&raquo;</strong></a><Br>
  <a href="#" onClick="r开发者_JS百科emoveSelectedOptions(document.forms[0]['lstto']); return false;"><strong>&laquo;</strong></a>
</td>  

Thanks


jsp is java with html. and I see above code of HTML you can place it just like normal text at proper place


You have to use the JSP Part in <% ...%>

Read this about Mixing JSP and HTML


Assuming that the code in the page is static javascript to be executed in the page context on the browser, you can simply copy that fragment in the appropriate place in an HTML body of your JSP.

If the fragment needs to be generated dynamically, you'll need to provide more details about what you are trying to do.


Based on your comment, my theory is that the javascript is broken, and there's nothing wrong with the way you are embedding the fragment in your JSP.

Use "view source" in your browser to see if the fragment above actually appears in the HTML of your page at the place you expect it to appear. If it does, that confirms my theory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜