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

歡迎訪問 生活随笔!

生活随笔

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

编程问答

纸绘武身(HCJ)

發布時間:2023/12/14 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 纸绘武身(HCJ) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

<!DOCTYPE?html>

<html>

<head>

????<meta?charset="utf-8"?/>

????<title>js</title>

????<!--?外部JS?-->

????<!--?<script?src="js/new_file.js"></script>?-->

????<!--?內部JS?-->

????<style>

????????p?{

????????????text-align:?center;

????????}

????????span?{

????????????color:?rgb(22,?241,?121);

????????}

????????div{

????????????border:?1px?solid?red;

????????}

????????#div0{

????????????width:?200px;

????????????height:?200px;

????????}

????????#div2{

????????????width:?100px;

????????????height:?100px;

????????}

????????#div3{

????????????width:?100px;

????????????height:?100px;

????????}

????????.divh2{

????????????color:?#962cec;

????????}

????</style>

????

</head>

<body>

????<!--?<img?id="star"?src="img/1.jpg"?width="100%">?-->

????<!--?<p>

????????<span?id="time">2</span>秒之后自動跳轉到首頁...

????</p>

????<input?id="openBtn"?type="button"?value="打開窗口">;

????<input?type="button"?id="btn"?value="獲取歷史記錄個數">

????<div?id="div1">div1</div>

????<div?class="cls1">div5</div>

????<input?type="text"?name="username">

????<a?>點我</a>

????<input?type="button"?id="btn_set"?value="設置屬性">

????<input?type="button"?id="btn_remove"?value="刪除屬性">

????<div?id="div0">

????????<div?id="div2">div2</div>

????????div\</div>

????????<a?href="javascript:void(0);"?id="del">刪除子節點</a>

????????<a?href="javascript:void(0);"?id="add">添加子節點</a>

????<div?id="divh">divh</div>

????<div?id="divh2">divh2</div>?-->

????<input?type="text"?id="blur">

????<select?id="change">

????????<option>選擇</option>

????????<option>石家莊</option>

????</select>

????<script?type="text/javascript">

????????//?regExp();

????????//?global();

????????//?bom();

????????//?bom1();

????????//?bom2();

????????//?dom();

????????//?dom1();

????????//?HTMLdom();

????????things();

//正則表達式對象??

????????function?regExp()?{

????????????var?reg?=?/^\w{6,9}$/;

????????????var?userName?=?"robin";

????????????var?flag?=?reg.test(userName);

????????????alert(flag);

????????}

????????function?global()?{

//編碼

????????????var?str?=?"羅賓";

????????????var?E?=?encodeURIComponent(str);

????????????var?D?=?decodeURIComponent(E);

????????????document.write(E?+?"<br?/>");

????????????document.write(D);

//轉數字

????????????var?str?=?"12sdc";

????????????var?num?=?parseInt(str);

????????????document.write(num);

//判斷NaN

????????????var?num1?=?NaN;

????????????document.write(isNaN(num1));

//解析

????????????var?str1?=?document.write("robin");

????????????eval(str1);

????????}

????????function?bom(){

//?history對象????????????

????????????var?btn=document.getElementById("btn");

????????????btn.οnclick=function(){

????????????????var?length=history.length;

????????????????alert(length);

????????????}

????????}

//輪播圖

????????function?bom1()?{

????????????var?num1?=?1;

????????????function?fun()?{

????????????????num1++;

????????????????if?(num1?>?3)?{

????????????????????num1?=?1;

????????????????}

????????????????var?getElementById?=?document.getElementById("star");

????????????????getElementById.src?=?"img/"?+?num1?+?".jpg";

????????????}

????????????setInterval(fun,?3000);

????????????//?confirm("確定返回true,反則");

????????????//?prompt("輸入框");

????????????//?setTimeout(fun,2000);單次定時

????????????//?reload();刷新

????????????//?history.back();forword();length();

????????????//?go();加載具體頁面?+-傳參?

????????????function?open()?{

????????????????document.getElementById("openBtn");

????????????}

????????}

//自動跳轉首頁

????????function?bom2()?{

????????????var?num?=?2;

????????????function?show()?{

????????????????num--;

????????????????if?(num?<=?0)?{

????????????????????location.href?=?"https://i.qq.com";

????????????????}

????????????????//?var?time=document.getElementById("time");

????????????????document.getElementById("time").innerHTML?=?num?+?"";//導入到body

????????????}

????????????setInterval(show,?1000);

????????}

????????function?dom()?{

//?獲取element對象,返回數組

????????????var?divs?=?document.getElementsByTagName("div");

????????????var?div_cls?=?document.getElementsByClassName("cls1");

????????????var?ele_username?=?document.getElementsByName("username");

????????????console.log(divs);

????????????console.log(div_cls);

????????????console.log(ele_username);

//?創建dom對象

????????????//?設置屬性

????????????var?table?=?document.createElement("table");

????????????console.log(table);

//?Element對象

????????????var?btn_set?=?document.getElementById("btn_set");

????????????btn_set.onclick?=?function?()?{

????????????????var?element_a?=?document.getElementsByTagName("a")[0];

????????????????element_a.setAttribute("href",?"form.html")

????????????????//?刪除屬性

????????????????var?btn_remove?=?document.getElementById("btn_remove");

????????????????btn_remove.onclick?=?function?()?{

????????????????????var?element_a?=?document.getElementsByTagName("a")[0];

????????????????????element_a.removeAttribute("href")

????????????????}

????????????}

//?Node對象???????????????????

????????????var?del=document.getElementById("del");

????????????del.οnclick=function(){

????????????????var?div0=document.getElementById("div0");

????????????????var?div2=document.getElementById("div2");

????????????????div0.removeChild(div2);

????????????}

????????????var?add=document.getElementById("add");

????????????add.οnclick=function(){

????????????????var?div0=document.getElementById("div0");

????????????????var?div2=document.createElement("div");

????????????????div2.setAttribute("id","div2");

????????????????div0.appendChild(div2);

????????????}

}

//?點切???????????

????????????function?dom1()?{

????????????????var?star?=?document.getElementById("star");

????????????????var?flag?=?false;

????????????????star.onclick?=?function?()?{

????????????????????if?(flag)?{

????????????????????????star.src?=?"img/1.jpg";

????????????????????????flag?=?false;

????????????????????}?else?{

????????????????????????star.src?=?"img/2.jpg";

????????????????????????flag?=?true;

????????????????????}

????????????????}

????????????}

function?HTMLdom(){

????????????????var?divh=document.getElementById("divh");

????????????????divh.innerHTML?+="<input?type='text'>";

//?樣式

????????????????divh.οnclick=function(){

????????????????????divh.style.border="5px?solid?red";

????????????????????divh.style.fontSize="20px";

????????????????}???????????????

????????????????var?divh2=document.getElementById("divh2");

????????????????divh2.οnclick=function(){

????????????????divh2.className="divh2";

????????????}

????????}

????????function?things(){

????????????document.getElementById("blur").οnblur=function(){

????????????????document.write("lost");

????????????}

????????????document.getElementById("change").οnchange=function(){

????????????????alert("change");

????????????}

????????}

????????

????????

????</script>

</body>

</html>

總結

以上是生活随笔為你收集整理的纸绘武身(HCJ)的全部內容,希望文章能夠幫你解決所遇到的問題。

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