总结以下两个:
http://dfch84.iteye.com/blog/1161785
http://www.iteye.com/problems/27397
jquery选择器很强大,但是用id选择时,id中如果有特殊字符,如点操作符'.',则无法获取到页面元素对象。
<s:hidden id="pagination.currentPage" name="pagination.currentPage" />
方法1: 使用\\对 . 进行转义
$("#pagination\\.currentPage").val(1);
方法2: 可以通过属性选择器来解决:
//采用属性选择器
$('input[id="pagination.currentPage"]').val(1);