5,17练习题二

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <style type="text/css">
        *{
            margin: 0px auto;
            padding: 0px;
        }

        #anniu{
            width:100px;
            height: 80px;
            text-align: center;
            line-height: 80px;
            background-color: blue;
        }
        #anniu2{
            width:100px;
            height: 80px;
            text-align: center;
            line-height: 80px;
            background-color: blue;
        }
        #anniu3{
            width:100px;
            height: 80px;
            text-align: center;
            line-height: 80px;
            background-color: blue;

        }
        #anniu4{
            width:100px;
            height: 80px;
            text-align: center;
            line-height: 80px;
            background-color: blue;
            display: none;
        }
        #continer{
            width:100%;
            height: 200px;
            background-color: red;

            }
        #anniu5{
            width:100px;
            height: 80px;
            text-align: center;
            line-height: 80px;
            background-color: blue;
            }
        #anniu6{
            width:100px;
            height: 80px;
            text-align: center;
            line-height: 80px;
            background-color: blue;
            display: none;
            float:left;
     }

    </style>
    <body>
        <div id="anniu" onclick="tanChuang()">按钮</div>
        <input type="button" name="" id="anniu2" value="按钮" onclick="tanChuang()"/>
        <button id=anniu3 onclick="tanChuang()">按钮</button>
            <br />    <br />
        <label onmouseover="xianshi()" onmouseout="yincang()"><input type="checkbox" />鼠标经过出现按钮</label>
        <button id="anniu4">按钮</button>
        <br />    <br />
        <div id="continer" onmouseover="yiRu()" onmouseout="yichu()">鼠标经过这个div变高变色,移出再恢复</div>
        <div id="anniu3" onclick="change1()">颜色1 </div>
        <br />    <br />
        <div id="anniu3" onclick="change2()">颜色2 </div>
        <br />    <br />
        <br />    <br />
        <button id="anniu5" onclick="showhide()">按钮1</button>
        <button id="anniu6" onclick="showhide()">按钮2</button>
    </body>
</html>
<script type="text/javascript">
    function tanChuang() {
        alert("弹出窗口");
    }
    function xianshi(){
        var div1 =document.getElementById("anniu4");
        div1.style.display="block";
    }
    function yincang(){
        var div1 =document.getElementById("anniu4");
        div1.style.display="none";
    }
    function yiRu(){
        var div2=document.getElementById("continer");
        div2.style.width = "80%";
        div2.style.height = "400px";
        div2.style.backgroundColor ="green"
    }
    function yichu(){
        var div2=document.getElementById("continer");
        div2.style.width = "100%";
        div2.style.height = "200px";
        div2.style.backgroundColor ="red "
    }
    function change1(){
        var bodycolor=document.body;
        bodycolor.style.backgroundColor="red";
    }
    function change2(){
        var bodycolor=document.body;
        bodycolor.style.backgroundColor="green";
    }
    function showhide(){
        var showhide = document .getElementById("anniu6").style.display;
        if(showhide==‘none‘){
            document .getElementById("anniu6").style.display="block";
        }else{
            document .getElementById("anniu6").style.display="none";
        }
    }

    </script>

原文地址:https://www.cnblogs.com/sunhao1987/p/9057967.html

时间: 2024-08-12 13:23:06

5,17练习题二的相关文章

C++编程基础一 33-编程练习题二

1 // 33-编程练习题二.cpp: 定义控制台应用程序的入口点. 2 // 3 4 #include "stdafx.h" 5 #include <iostream> 6 #include <climits> 7 #include <array> 8 #include <math.h> 9 #include <string> 10 using namespace std; 11 12 enum CH 13 { 14 A,

python/MySQL练习题(二)

python/MySQL练习题(二) 21.查询各科成绩前三名的记录:(不考虑成绩并列情况) 1 select score.sid,score.course_id,score.num,T.first_num,T.second_num from score left join 2 ( 3 select 4 sid, 5 (select num from score as s2 where s2.course_id = s1.course_id order by num desc limit 0,1

mysql练习题二

建立表格 1.创建student和score表 CREATE  TABLE  student ( id  INT(10)  NOT NULL  UNIQUE  PRIMARY KEY  , name  VARCHAR(20)  NOT NULL , sex  VARCHAR(4)  , birth  YEAR, department  VARCHAR(20) , address  VARCHAR(50) ); 创建score表.SQL代码如下: CREATE  TABLE  score ( id

练习题-二维数组中的查找

<剑指offer>中的一个题目: 在一个二位数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下的递增的顺序排序.请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数. 例如,下面的二位数组就是每行.每列都递增排序.如果在这个数组中查找数字7,则返回true:如果查找数字5,由于数组不含该数字,则返回false. int matrix[] = { 1, 2, 8, 9, 2, 4, 9, 12, 4, 7, 10, 13, 6, 8, 11, 15 }; 代码

重修课程day45(mysql之练习题二)

准备表: create table class(cid int primary key auto_increment, caption char(5) not null unique); INSERT into class(caption)values('三年二班'),('一年三班'),('三年一班'); CREATE table student(sid int primary key auto_increment, sname char(6) not null, gender enum('男'

Day 45 Mysql 数据库练习题二

1.表关系   注意:创建表时,根据合理性设置字段的长度和类型. 2.下面:开始你的表演 1.查询所有人员信息 2.只查询人员的姓名和年龄 3.查询年龄为20岁的有哪些人员 4.查询60岁以下的人员有哪些人员 5.查询50岁以上并且工资大于8000的人员有哪些 6.查询姓[张]的人员有哪些 7.查询哪些人员属于 武当/华山/嵩山 8.查询工资在 5000-8900 的人员有哪些 9.查询所有人员,要求按工资倒序排列 10.查询令狐冲的领导人是谁 11.查询人员表中最高工资是多少 12.查询人员表

PYTHON练习题 二. 使用random中的randint函数随机生成一个1~100之间的预设整数让用户键盘输入所猜的数。

Python 练习 二. 使用random中的randint函数随机生成一个1~100之间的预设整数让用户键盘输入所猜的数,如果大于预设的数,屏幕显示"太大了,请重新输入"如果小于预设的数,屏幕显示"太小了,请重新输入"如此循环,直到猜中,显示"恭喜你,猜中了!共猜了N次"N为用户猜测次数. 答案: import random def guess_number(): true_num = random.randint(1, 100) user_n

[龙书]理论练习题(二)

不对之处,敬请指出! 3.3.3:试说明在一个长度为n的字符串中,分别有多少个 3.3.5:写出以下语言的正规式定义 (1)顺序包含所有5个元音字母的小写字符串. NonVowel → [b-df-hj-np-tv-z] L→(NonVowel| a)*a(NonVowel|e)*e(NonVowel|i)*i(NonVowel|o)*o(NonVowel|u)*uNonVowel* (2)所有字母按升序排列的小写字母串 a*b*c*...y*z* (3)注释,即/*和*/之间的串,且串中没有不

PHP练习题(二)

程序6.题目: 假设某人有100,000现金,每经过一次路口需要进行一次交费交费规则为当他现金大于50,000时每次需要交%5,如果现金小于等于50,000时每次交5,000.问此人可以经过多少次这个路口. 1 $money = 100000; 2 $i = 0; 3 while($money >= 5000) { 4 if( $money > 50000) { 5 $money *= 95/100; 6 } else if( $money <= 50000) { 7 $money -=