easyui使用时出现Uncaught TypeError: Cannot read property ‘textbox‘ of undefined

easyui使用时出现Uncaught TypeError: Cannot read property 'textbox' of undefined 

想要在function中通过$("#curname").textbox("getValue")获取文本框内容,

但一直报这个错误,而且用同样的方法获取单选框和复选框内容是可以的,就偏偏文本框不行。

后来发现是因为我的中只定义了name,没有定义id,把name改成id以后就可以运行了。

但后台controller的action无法把textbox的文本框内容存入数据库,再加一个name定义就好了

你可能感兴趣的:(java,javascript,easyui)