Calling Java inside JavaScript Function

后端 未结 8 982
时光取名叫无心
时光取名叫无心 2020-12-04 02:26

Please tell me if we can call java inside javascript function ?


    

        
8条回答
  •  庸人自扰
    2020-12-04 02:37

    I think you have lack of understanding of what is going on here. Anything in middle of <% %> is executed when the page is first requested. Anything in javascript is executed when the browser calls it. What you have will never happen and there is no way to make it happen. However, you can use AJAX to do something like this but that's a different question.

提交回复
热议问题