D:\\wamp\\www\\thinkphp\\Home\\Lib\\Action D:\\wamp\\www\\thinkphp\\Home\\Lib\\Model D:\\wamp\\www\\thinkphp\\Home\\Tpl
1
2
3
4
5
6
7
8
9<volist name = 'data' id = 'vo'>
<tr>
<td >{$vo.id }</td>
<td >{$vo.username}</td>
<td >{$vo.sex}</td>
<td ><a href = "/thinkphp/index.php/User/del/id/{$vo.id}" >删除</a> | 修改</td>
</tr>
</volist>
ThinkPHP作为面向对象的框架, 全部 由C层 控制台来控制输入输出。调用模板、数据库!1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29<html>
<head>
<meta http-equiv-"content-type" content="text/html;charset-utf-8">
<title>Modify</title>
<script>
window.onload = function(){
if({$data.sex }== 0 ){
alert(0);
document.getElementsByName('sex')\[1\].checked = true;
}else{
document.getElementsByName('sex')\[0\].checked = 'checked';
}
}
</script>
</head>
<body>
<form>
姓名:<input type = "text" name = 'username' value = "{$data.username}"/></br>
性别:男<input type = "radio" name = 'sex' value = '1' > 女<input type = "radio"
name = 'sex' value = '0'/></br>
<input type = 'submit' value = "提交修改"/>
</form>
</body>
</html>