在Struts 2中使用Ajax URL调用操作
我正在尝试使用Ajax中的URL连接到我的action类。 但它没有进入我的动作类,甚至没有使用$("#selectedCountry").val()
显示所选值。
function getstates(){ alert($("#selectedCountry").val()); $.ajax({ type : "GET", url : "/ThirdTask/selectstate.action", dataType : 'text', data : "name="+$("#selectedCountry").val(), success : function(){ $('statesdivid').html(); }, error : alert("No values found..!!") }); }
我的JSP代码如下: