30. <th>性别</th>
31. <th>年龄</th>
32. <th>生日</th>
33. <th>电话</th>
34. <th>地址</th>
35. </tr>
36. </tbody>
37. </table>
38. </body>
39. </html>
五、新建一JavaScript文件show.js
Js代码
1. // 定义一个JSONRPC对象
2. var jsonrpc;
3. window.onload=function(){
4. jsonrpc=new JSONRpcClient("JSON-RPC");
5. }
6. // 事件处理函数
7. function search(){
8. var userId=document.getElementsByName("userId")[0].value;
9. if(userId==null||userId==""){
10. erService.getNameList(showList);
11. erService.getNameSet(showSet);
12. erService.getNameMap(showMap);
13. }else{
14. erService.getNameById(showName,userId);
15. erService.getUserById(showUser,userId);
16. }
17. }
18. // 定义一个User类
19. function User(name,gender,age,phone,address,email){