$(document).ready(function(){
$("form:first").bind("submit",submitForm);
$("input[@type=button]").addClass("Button");
$("input[@type=submit]").addClass("Button");
$("#tabs > ul").tabs();
});
$.ajax({
type: "POST",
url: "<%=frame.common.ConstantsWeb.webUrl%>/sys/roleManaAction.go",
data:"command=menu&roleid="+roleId,
cache: false,
success: function(html){
$("#fragment-2").html(html);
}
});
$("form:first").bind("submit",submitForm);
$("input[@type=button]").addClass("Button");
$("input[@type=submit]").addClass("Button");
$("#tabs > ul").tabs();
});
$.ajax({
type: "POST",
url: "<%=frame.common.ConstantsWeb.webUrl%>/sys/roleManaAction.go",
data:"command=menu&roleid="+roleId,
cache: false,
success: function(html){
$("#fragment-2").html(html);
}
});
$("form:first").bind("submit",submitForm); //第一个表单绑定onsubmit事件为submitForm函数
$("input[@type=button]").addClass("Button"); //所有button加样式Button
$("input[@type=submit]").addClass("Button"); //所有submit的button也加样式
$("#tabs > ul").tabs(); //id为tabs下的ul执行tabs()函数.
});
$.ajax({ //AJAX
type: "POST",//提交类型
url: " <%=frame.common.ConstantsWeb.webUrl%>/sys/roleManaAction.go", //URL
data:"command=menu&roleid="+roleId, //传输的参数
cache: false, //是否缓存
success: function(html){//成功回调函数
$("#fragment-2").html(html); //id为fragment-2的innerHTML替换成AJAX获取值
}
});
意思是寻找input中属性type为button的对象
新版1.3之后的要把@号去掉.