日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

html近期所学

發布時間:2023/12/3 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 html近期所学 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

導航欄(新學的,,,,,其實就是簡單的href)
css
開門大吉
輪播樣式

js
css
js1
js1
js1
js1
js1
js7

首先是css

開門大吉

改只需其中的gif <html><head><style>section{width: 361px;height: 247px;border: red 1px solid;margin: 100px auto;background:url(erha.gif);position: relative;}.l,.r{position: absolute;top:0;width:50%;height:100%;background-color: red;transition:all 1s;}.l{left:0;border:1px solid #000;transform-origin: left;}.r{right:0;border:1px solid #000;transform-origin: right;}section:hover .l{transform: rotateY(-130deg);}section:hover .r{transform: rotateY(-130deg);}</style></head><body><section><div class="l"></div><div class="r"></div></section></body> </html>

輪播樣式

<html><style>ul{list-style:none;}div{width: 318px;height: 500px;border: 1px solid #ccc;margin: 50px auto;padding: 5px auto;position: relative;}.l{position:absolute;top: %50;margin-top: -250px;left:0;}.r{position:absolute;top: %50;margin-top: -250px;right:0;}.circle{width:65px;height: 13px;background-color:;position:absolute;margin-top: -14px;left: 50%;margin-left: -55px;}.circle li{width:9px;height: 9px;background-color: #B7B7B7;float: right;margin: 2px;border-radius: 50%;background: rgba(0,0,0,0.5);}.circle .current{background-color: #f40;}</style> <body><div><img src="2.jpg" height="500" ><img src="left.png" width="40" height="40" class="l" ><img src="right.png" width="30" height="40" class="r"><ul class="circle"><li class="current"></li><li></li><li></li><li></li><li></li><ul></div> </body> </html>

隨便找的圖


js

賬戶密碼獲取

<html><title>show</title> <body><form method="get" action="xxx.php"><input type="txt" name="username" value=""><input type="password" name="word" value=""><input type="submit" name="sub" ></form> </body> </html>

xxx.php

<?phpecho '<pre>';var_dump($_REQUEST);

回車發送命令(按鍵)

<html> <head> <meta charset="utf8"> <style> #count{width:200px;height:100px;border:black solid 1px; } </style> <link rel="stylesheet" href="css/bootstrap.css"> <script src="js/jquery-3.4.1.js"></script> <script src="js/bootstrap.js"></script> </head><body> <div> <input type="button" id="btn" value="點我"> <input type="text" id="txt" value=""></div> <div id="count"></div><script>document.onkeydown = function(e){if(e.keyCode==13){count.innerHTML = txt.value;}}btn.onclick = function(){count.innerHTML = txt.value;}</script> </body></html>

計時器

<html> <head> <meta charset="utf8"> <style> #count{width:200px;height:100px;border:black solid 1px; } </style> <link rel="stylesheet" href="css/bootstrap.css"> </head><body> <div> <input type="button" id="btn" value="點我"> </div> <div id="count"><span><span> </div><script>var a=document.getElementById('btn');var b=document.getElementById('count');var timer =null;var count=0;b.innerHTML=count;timer = function tip(){count++;b.innerHTML=count;}a.onclick=function(){setInterval(timer,1000);}</script> </body><script src="js/jquery-3.4.1.js"></script> <script src="js/bootstrap.js"></script> </html>

通過按鈕實現清屏

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script> window.onload=function(){ document.getElementById("btn").onclick=function(){displayDate()};function displayDate(){ txt.value="我喜歡你"; } }</script> </head> <body> <input id="txt" value=""> <button id="btn">清屏</button></body> </html>

選項卡(輪播圖原型)

<html> <head> <meta charset="utf8"> <style> #div1 div{ width:200px; height:200px; border:black solid 2px; display: none; }#div1 .active{ background:red; } </style> <link rel="stylesheet" href="css/bootstrap.css"> </head><body> <div id="div1"><input id="btn1" class="active" type="button" value="農藥資訊"><input id="btn2" type="button" value="前方消息"><input id="btn3" type="button" value="最新報道"><input id="btn4" type="button" value="聊天"><div style="display:block;">21123</div><div >321231</div><div >231321</div><div>54654321</div></div ><script>var oDiv=document.getElementById("div1");var aBtn=div1.getElementsByTagName("input");var aDiv=div1.getElementsByTagName("div");for(var i=0;i<aBtn.length;i++){ aBtn[i].index=i;aBtn[i].onclick=function(){ for(var i=0;i<aBtn.length;i++){aBtn[i].className="none";aDiv[i].style.display="none";}this.className="active";aDiv[this.index].style.display='block';}}</script> </body><script src="js/jquery-3.4.1.js"></script> <script src="js/bootstrap.js"></script></body> </html>

階乘

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script> //點擊btn觸發函數事件 window.onload=function() { document.getElementById("btn").onclick=function(){add() } };//定義一個階乘的函數 function add() {var i,j=1;for(i=1;i<=txt.value;i++){j=j*i;}txt1.value=j; }</script> </head> <body> <input id="txt" value=""> <button id="btn">的階乘是</button> <input id="txt1" value=""></body> </html>

密碼一致登錄

<html><body><input type="password" id="password" name="password" value="登 錄"/> 加個按鈕 <input name="a" type="submit" value="登 錄" onclick="checkpassword();"/></body> <script>function checkpassword(){var pwd="1234567";//你和朋友約定的密碼,寫死的var inpwd=document.getElementById("password").value;//獲取輸入的代碼if(pwd == inpwd){ //判斷一下是否一樣window.location.href="img1.html";} } alert(inpwd); </script></html>

Top

總結

以上是生活随笔為你收集整理的html近期所学的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。