前台:
<script src="js/jquery-1.8.2.js" type="text/javascript"></script>
<script type="text/javascript">
function kk() {
$.post("bookshow_findBookAskind.action?book.bookkind="+$("#sendkind").val());
}
</script><div id="nn">
<s:iterator id="bookKinds" value="bookKinds">
<input type="button" onclick="kk()" id="sendkind" value="${bookKinds}"/>
</s:iterator>
</div>

解决方案 »

  1.   

    先alert出来看页面有没有值,book.bookkind你的参数名最好别用对象的方式,没什么必要。
      

  2.   

    alert是可以查出值的,就是post提交的时候后台接受不到,对象方式传值会有影响?
      

  3.   

    private Book book;
    通过book对象的get方法接收前台数据
      

  4.   

    $("#sendkind").val();
    把这个赋给一个var, 在url后面加这个var 试试或者实施直接用from表单提交试试,看能不能取值
      

  5.   

    private Book book;
     通过book对象的get方法接收前台数据 
      

  6.   


    后面传参数 请你用$.get({
    })
    post 那有你这样写的
      

  7.   

    $.post(url,params,function(){},type);相信你能看懂的!
      

  8.   

    我觉得你的前台有取到值
    <s:iterator id="bookKinds" value="bookKinds">
     <input type="button" onclick="kk()" id="sendkind" value="<s:property value='bookKinds'/>"/>
     </s:iterator>
     把这个value换成这个样子,然后把你往后台传参数的那个不要用对象传,而用一个参数变量传递
      

  9.   

    <script src="js/jquery-1.8.2.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    $(".sendkind").click(function(){
    $.post("bookshow_findBookAskind.action?book.bookkind="+$(this).val());
    });
    });
    </script> <div id="nn">
    <s:iterator id="bookKinds" value="bookKinds">
    <input type="button"  class="sendkind" value="${bookKinds}" />
    </s:iterator>
    </div>
    试试
      

  10.   

    $.ajax({
    type: "POST",
    url: postUrl, 
        cache: false,
        dataType: "html",
        data: postData, 
        success: callback,
        error: callbackError || function(){}
    });然后你的ajax请求应该这样写