zoukankan      html  css  js  c++  java
  • 大二下学期学习进度(十一)

    编程时间:18小时左右

    代码行数:约1600行

    博客园发表量:4篇

    所学知识点:

    1)window.onload() 方法用于在网页加载完毕后立刻执行的操作,即当 HTML 文档加载完毕后,立刻执行某个方法。

    header("Location:hw3.3.php");表示跳转页面。
    echo "<script>alert('1+2+...+$number=$sum')</script>";
    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta name="viewport"
    content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    </head>
    <body>
    <div style="text-align: center"><b>用户注册</b></div>
    <form style="text-align: center" id="form1" name="form1" method="post" action="">
    <p>&nbsp;&nbsp;&nbsp;&nbsp;用户名:
    <input type="text" name="xm">
    </p>
    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;密码:
    <input type="password" name="pwd1">
    </p>
    <p>确认密码:
    <input type="password" name="pwd2">
    </p>
    <p>
    <input type="submit" name="submit" value="提交">
    <input type="reset" nmae="reset" value="重置">
    </p>
    </form>
    </body>
    </html>
    <script>
    window.onload=function () {
    <?php
    if (!empty($_POST)){
    $username=$_POST['xm'];
    $pwd1=$_POST['pwd1'];
    $pwd2=$_POST['pwd2'];
    if(empty($username)){
    echo "alert('用户名不能为空');";}
    else if(!empty($_POST['pwd1'])&&!empty($_POST['pwd2']))
    if($pwd1!==$pwd2){
    echo"alert('两次密码不一样');";
    }
    else
    header("Location:hw3.3.php");
    }
    ?>
    }
    </script>
  • 相关阅读:
    ASP.NET WebAPI Get和Post 传参总结
    关于EF第一次加载慢或过一段时间不访问时再次访问加载慢问题的总结
    jqthumb.js缩略图插件-让缩略图正常显示而不变形
    解决kindeditor编辑器中使用百度地图时不能拖动坐标的问题
    Jzoj3591 数据
    Jzoj3590 珠链
    Jzoj3590 珠链
    C++蜂鸣器歌曲1
    C++蜂鸣器歌曲1
    Jzoj2309 辽哥游戏
  • 原文地址:https://www.cnblogs.com/zzstdruan1707-4/p/10934620.html
Copyright © 2011-2022 走看看