求救各位大神~~~
这是我的struts
<action name="GetHomePageMainAction" class="com.fullmart.control.GetHomePageAction" method="getMainChannelList">
<result name="success">/index.jsp
<param name="mchList"></param>
</result>
</action>
当页面一开始加载的时候,我想通过jquery在前台获取方法getMainChannelList返回来的数据!
各位如何实现。
下面是我自己写的,实现不了
$(function(){
function initIndexChannel(){
$.ajax({
type: "post",
url: "GetHomePageMainAction.action?r="+new Date(),
data:"mchList",
success: function(data){
alert(data.name);
}
});
}
initIndexChannel();
});