javascript in jsf/icefaces

前端 未结 3 670
渐次进展
渐次进展 2020-12-11 09:29

I have file with jspx extension i write javascript like

function isNumber(inputId){

            var value = document.getElementById(\'mainForm:\'+ inputId)         


        
3条回答
  •  感动是毒
    2020-12-11 09:58

    As explained by Matt Handy, you could not use the < or > sign in your JSPX, as this is a XML format. You have three solutions regarding your problem:

    • Escape by using < or >.
    • Use to hold your JavaScript code in your page.
    • Set your JavaScript code in a separate .js file, and load it in your JSPX page.

提交回复
热议问题