标签:des style class blog code java
view
function init_tree(product_name) { var htmlobj=$.ajax({url: "get_all_file?param=" + param_value, async: false}); var jsonNodes = htmlobj.responseText; var newNodes = $.parseJSON(jsonNodes); //使用newNodes更新页面
}
controller
def get_all_file # 为@file_tree赋值 @file_tree=[{:id => code, :pId => p_code, :name => file}, {:id => code1, :pId => p_code1, :name => file1}] respond_to do |format| format.json { render :json=> @file_tree } end end
rails Ajax--利用Jquery,布布扣,bubuko.com
标签:des style class blog code java
原文地址:http://www.cnblogs.com/zs-note/p/3773252.html