ThinkPHPKJ_S01

D:\\wamp\\www\\thinkphp\\Home\\Lib\\Action D:\\wamp\\www\\thinkphp\\Home\\Lib\\Model %e6%8d%95%e8%8e%b7 D:\\wamp\\www\\thinkphp\\Home\\Tpl %e6%8d%95%e8%8e%b71

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>

(っ•̀ω•́)っ✎⁾⁾ 坚持技术学习、内容输出与分享,您的支持将鼓励我继续创作!(*/ω\*)
( • ̀ω•́ )✧如有疑问或需要技术讨论,请留言或发邮件到 aclearzhang@qq.com.(*・ω< ) 
  • 本文作者:: AClearZhang
  • 本文链接:: 75.html
  • 版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 许可协议。转载请注明出处!