感谢您的支持,我会继续努力的!
打开微信扫一扫,即可进行扫码打赏哦
点我查看本站打赏源码!
Powered by RUNCODEX.COM,学的不仅是技术,更是梦想!!!
<!DOCTYPE html>
<html>
<head>
<mate charset="utf-8"/>
<title>Home</title>
<script>
var result_1;
function MyFunction(){
document.getElementById("append").innerHTML="becuase of It's a unuseful page!";
}
function add(){
var a,b;
a=document.getElementById("firstNumber").value;
b=document.getElementById("secondNumber").value;
var result = Number(a)+Number(b);
sendResult(result);
function sendResult(result_1) {
var num = document.getElementById("result")
num.innerHTML = result_1;
</script>
</head>
<body id="all">
<div id="head">
<ul>
<li><a>首页</a></li>
<li>热门</li>
<li>路线</li>
<li>景点</li>
<li>酒店</li>
<li><a>帮助</a></li>
</ul>
<button type="button" class="login">登陆</button>
<button type="button" class="regist">注册</button>
</div>
<div id="start">
<li>北京:
<select>
<option>天安门</option>
<option>故宫</option>
<option>紫禁城</option>
</select>
</li>
<br/>
<li>上海:
<option>迪士尼</option>
<option>外滩</option>
<option>东方之珠</option>
<li>广州:
<option>小蛮腰</option>
<option>观音山</option>
<option>白云山</option>
<li>成都:
<option>武侯祠</option>
<option>欢乐谷</option>
<option>熊猫基地</option>
<div class="description">
<sanp>
<p id="append">I don't waht it is!</p>
<button type="button" onclick="MyFunction()">Do you want the reson?</button>
</sanp>
<div id="math">
<p>计算器:</p>
<input type="text" value="" id="firstNumber"/>
<button type="button">+</button>
<input type="text" value="" id="secondNumber"/>
<button type="button" onclick="add()">=</button>
<p id="result"></p>
</body>
</html>
输入 JavaScript 代码……
xxxxxxxxxx
#all li{
list-style:none;
#head{
background:#aaa;
width:960px;
height:30px;
float:left;
#head>ul{
width:550px;
margin-top:0px;
margin-left:auto;
#head>ul>li{
width:60px;
line-height:30px;
font-weight:bold;
padding-left:20px;
border-radius:3px;
#head>button{
width:50px;
text-align:center;
line-height:20px;
float:right;
background:#555;
color:#fff;
#head>ul>li:hover{
background:#2932e1;
#start{
background:#eff;
height:160px;
#start>ul{
width:200px;
height:140px;
#start>ul>li{
color:#2932e1;
font-size:14px;
#start>ul>li>select{
background:#666;
.description{
width:400px;
background:red;
margin-top:16px;
.description button{
border:1px solid black;
border-radius:2px;
#math{
width:300px;
background:blue;
#math>input{
width:30px;
height:20px;