答案......
<!DOCTYPE? HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函數(shù)</title>
<script type="text/javascript">
//定義函數(shù)
function big(i,j){
? ? var i,j;
? ? var b;
? ? if(i>j){
? ? ? ? b = i;
? ? ? ? return b;
? ? }else if(i<j){
? ? ? ? b = j;
? ? ? ? return b;
? ? }else{
? ? ? ? return '兩數(shù)相等!';
? ? }
}
//調(diào)用函數(shù),實(shí)現(xiàn)下面兩組數(shù)中,返回較大值。
? document.write(" 5 和 4 的較大值是:"+big(5,4)+"<br>");
? document.write(" 6 和 3 的較大值是:" +big(6,3)+"<br>");?
? document.write(" 3 和 3 的較大值是:"+big(3,3));
</script>
</head>
<body>
</body>
</html>
2018-08-23
<!DOCTYPE html>
<html>
?<head>
? <title>瀏覽器對(duì)象</title>?
? <meta http-equiv="Content-Type" content="text/html; charset=gkb"/>??
?</head>
?<body>
? <!--先編寫好網(wǎng)頁布局-->
? <h1>操作成功</h1>
<span id="second" >5</span>
? <span >秒后回到主頁</span>
? <a href="javascript:back();">返回</a>
?
?
?
? <script type="text/javascript">?
??? var num=document.getElementById("second").innerHTML;
?? //獲取顯示秒數(shù)的元素,通過定時(shí)器來更改秒數(shù)。
?
??? function count()
??? {
??????? num--;
??????? document.getElementById("second").innerHTML=num;
??????? if(num==0)
??????? {
??????????? location.assign("idcbgp.cn");
??????? }
??? }
??? setInterval("count()",1000);
?? //通過window的location和history對(duì)象來控制網(wǎng)頁的跳轉(zhuǎn)。
??? function back()
??? {
?????? window.history.back();
?? }
??
?</script>
</body>
</html>