zoukankan      html  css  js  c++  java
  • 8.常见事件应用

    <!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>
      <title> new document </title>
      <meta http-equiv = "content-type" content ="text/html;charset=utf-8" /> 
      <meta name="keywords" content="">
      <meta name="description" content="">  
     </head>  
     <body onload = "dosomething()">
      <form onsubmit = "return oncheck();">
        <p><label for="username">用户名:</label><input type="text"  name="username" id="username" onfocus = "this.value = '';"  onblur="if(this.value == '')alert('用户名不能为空');"  value="请输入你的用户名" /></p>
        <p><label for="pwd">密码:</label><input type="password" name="pwd" id="pwd"   ></p>
        <p><input type="checkbox" id="re" name="re" onclick = "alert('你选择了记住密码')" ><label for="re">记住密码</label></p>
        <p>  
            <input type="submit" name="" value="登录" /> 
            <input type="reset" name="pwd" value="取消"> 
        </p>
        
      </form>
      <script type="text/javascript">
        function dosomething(){
            alert("页面加载完成,欢迎来到登录页面");     
        }
        function oncheck(){
            if( confirm("确定提交登录吗?") ){
                return true;
            }else{
                return false;
            }
        }
      </script>
     </body>
    </html>
  • 相关阅读:
    医疗设备软件的安全性问答
    python使用技巧
    C++对象模型
    面向对象方法综述
    如何设计可扩展性系统架构
    敏捷过程
    python中import的相关知识总结
    软件架构的关键原则
    读后感——程序员的思维修炼
    LINUX系统备份工具
  • 原文地址:https://www.cnblogs.com/xiaotaoxu/p/5544554.html
Copyright © 2011-2022 走看看