本文实例讲述了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" />
新闻热点
疑难解答
图片精选