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

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

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

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

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

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


版权声明:本文为weixin_45830800原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。