js JAvaWEb ssh struts hibernate spring js 和java对比
<script>
var data={"name":"Jack",mList:[{"name":"Lily"},{"name":"Luce",dep:{"name":"Res"}}]};
alert(data);
alert(data.name);
alert(data.mList[1].dep.name);
</script>
public class TestAction{
public void getname(){
}
public Collection getMList(){}
}
public calss MenueItem {
public void getName(){}
public Department getDep(){}
}
public calss Department{
public void getName(){}
}
var param={kid:1,pid=5}
$.post("url",param,function(){
})
deptAction impModernDireve<Depat>{
private String messsage;
privaet Strng getMessage(){
retun Messsage;
}
save(){
Messsage="failue";
}
}
Depart{
int id;
String name;
}
url.action?kid=1&pid=5
request.getParame();
<input name="pid" value="1">
<input id="dd" name="id" value="1">
<input id="nn" name="name" value="kkkk">
sendData(){
$("#id").val();
$("#dname").val();
var param={
id:$("#id").val(),
name:$("#dname").val()
}
$.post("deptAction_save.action",para,function(data){
alert(data);
});
}