首页 > 语言 > JavaScript > 正文

jQuery操作JSON的CRUD用法实例

2024-05-06 14:45:43
字体:
来源:转载
供稿:网友

本文实例讲述了jQuery操作JSON的CRUD用法。分享给大家供大家参考。具体实现方法如下:

代码如下:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<title>Jquery ui</title> 
<link href="css/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" /> 
<script src="js/jquery-1.6.2.min.js" type="text/javascript"></script> 
<script src="js/jquery-ui-1.8.16.custom.js" type="text/javascript"></script> 
</head> 
// Author By Eric Liang  
<body> 
    <form> 
            <table border="1" id="personform"> 
                    <tr> 
                        <td>id</id> 
                        <td>name</td> 
                        <td>sex</td>     
                        <td>age</td> 
                        <td>Delete Action</td>   
                        <td>Update Action</td> 
                    </tr> 
            </table> 
    </form> 
    id:   <input type="text" id="userid" /> 
    name: <input type="text" id="username"/> 
    sex:  <input type="text"  id="sex"/> 
    age:  <input type="text"  id="age"/> 
    <input type="button" value="add" onclick="addperson()"/> 
</br> 
    id:   <input type="text" id="update_userid" disabled="disabled" /> 

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选