Calling Java inside JavaScript Function

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

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


    

        
8条回答
  •  春和景丽
    2020-12-04 02:48

    While the answer of "No" is technically correct based on the phrasing of the question. You may want to read up on AJAX. It is a way for javascript to make a request to your backend code (in this case Java).

    Javascript is client side, meaning it is run by the user's browser. Java is running on your server. In order for the client side javascript to interact with the backend Java, you need to make a request to the server.

提交回复
热议问题