zoukankan      html  css  js  c++  java
  • 学习:DOJO入门GET

    	dojo.xhrGet({
    		url: "/dojoHttpServlet?service=jsp_showPerms",
    		handleAs: "json",
    		load: function(data) {
    			if(data==null){
    				console.log("空返回值");
    				return ;
    			}
    			var table = "<table border=\"1\" id=\"perm_table\">";
    			table += "<tr><th>权限ID</th><th>权限名</th></tr>";
    			dojo.forEach(data.rows, function(perm) {
    				console.log(perm);
    				table += "<tr><td>";
    				table += perm.pid;
    				table += "</td><td>";
    				table += perm.name;
    				table += "</td></tr>";
    			});
    			table += "</table>";
    			dojo.place(table, dojo.body());
    		}
    	});
    

      

    从jsp servlet获取json格式数据,并形成表格的一种做法。

  • 相关阅读:
    ubuntu 1804 docker install
    windows shortcut
    gallary
    g++ play
    linux profile
    terminator
    tmux
    ubuntu18
    windows toolkit
    windows terminal CLI
  • 原文地址:https://www.cnblogs.com/anrainie/p/2459464.html
Copyright © 2011-2022 走看看