找到關於 DOM 的 57 篇文章

HTML ondragstart 事件屬性

AmitDiwan
更新於 2019年9月27日 12:12:56

64 次瀏覽

HTML ondragstart 事件屬性在使用者開始拖動 HTML 文件中 HTML 元素或元素文字時觸發。語法以下是語法 -讓我們來看一個 HTML ondragstart 事件屬性的例子 -示例 線上演示    body {       color: #000;       height: 100vh;       background-color: #FBAB7E;       background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%);       text-align: center;    }    .drop-target {       display: inline-block;       width: 150px;       height: 150px;       border: 2px solid ... 閱讀更多

HTML ondrop 事件屬性

AmitDiwan
更新於 2019年9月27日 12:08:02

110 次瀏覽

當可拖動元素或文字被拖放到 HTML 文件中的有效放置目標上時,將觸發 HTML ondrop 事件屬性。語法以下是語法 -讓我們來看一個 HTML ondrop 事件屬性的例子 -示例 線上演示    body {       color: #000;       height: 100vh;       background-color: #FBAB7E;       background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%);       text-align: center;    }    .drop-target {       display: inline-block;       width: 150px;       height: 150px;       border: 2px solid #FFF; ... 閱讀更多

HTML ondragleave 事件屬性

AmitDiwan
更新於 2019年9月27日 12:00:48

54 次瀏覽

當可拖動元素或文字退出 HTML 文件中的有效放置目標時,將觸發 HTML ondragleave 事件屬性。語法以下是語法 -讓我們來看一個 HTML ondragleave 事件屬性的例子 -示例 線上演示    body {       color: #000;       height: 100vh;       background-color: #FBAB7E;       background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%);       text-align: center;    }    .drop-target {       display: inline-block;       width: 150px;       height: 150px;       border: 2px solid #FFF;     ... 閱讀更多

HTML ondragend 事件屬性

AmitDiwan
更新於 2019年9月27日 11:49:21

68 次瀏覽

當用戶完成拖動 HTML 文件中 HTML 元素的元素或文字時,將觸發 HTML ondragend 事件屬性。語法以下是語法 -讓我們來看一個 HTML ondragend 事件屬性的例子 -示例 線上演示    body {       color: #000;       height: 100vh;       background-color: #FBAB7E;       background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%);       text-align: center;    }    .drop-target {       display: inline-block;       width: 150px;       height: 150px;       border: 2px solid #FFF; ... 閱讀更多

HTML onpageshow 事件屬性

AmitDiwan
更新於 2019年9月27日 11:41:31

85 次瀏覽

當用戶導航到網頁時,將觸發 HTML onpageshow 事件屬性。語法以下是語法 -讓我們來看一個 HTML onpageshow 事件屬性的例子 -示例 線上演示    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;    } HTML onpageshow 事件屬性演示    function showFn() {       alert("您好!您正在主頁上");    } 輸出點選警告框的“確定”按鈕以顯示 HTML 文件的內容。

HTML ononline 事件屬性

AmitDiwan
更新於 2019年9月27日 11:37:04

83 次瀏覽

當瀏覽器開始線上工作時,將觸發 HTML ononline 事件屬性。語法以下是語法 -讓我們來看一個 HTML ononline 事件屬性的例子 -示例 線上演示    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;    }    .show {       font-size: 1.2rem;       color: #fff;    } HTML onoffline/ononline 事件屬性演示 嘗試停用/啟用您的網路。    function onlineFn() {       alert("您好!您已上線");    }    function offlineFn() {       alert("您好!您已離線");    } 輸出現在嘗試啟用/停用您的網路以觀察 onoffline/ononline 事件屬性的工作方式 -

HTML onoffline 事件屬性

AmitDiwan
更新於 2019年9月27日 11:31:26

68 次瀏覽

當瀏覽器開始離線工作時,將觸發 HTML onoffline 事件屬性。語法以下是語法 -讓我們來看一個 HTML onoffline 事件屬性的例子 -示例 線上演示    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;    }    .show {       font-size: 1.2rem;       color: #fff;    } HTML onoffline/ononline 事件屬性演示 嘗試停用/啟用您的網路。    function onlineFn() {       alert("您好!您已上線");    }    function offlineFn() {       alert("您好!您已離線");    } 輸出現在嘗試啟用/停用您的網路以觀察 onoffline/ononline 事件屬性的工作方式 -

HTML onload 事件屬性

AmitDiwan
更新於 2019年9月27日 11:28:16

203 次瀏覽

當 HTML 文件中的物件載入完畢時,將觸發 HTML onload 事件屬性。語法以下是語法 -讓我們來看一個 HTML onload 事件屬性的例子 -示例 線上演示    body {       color: #000;       height: 100vh;       background-color: #FBAB7E;       background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%);       text-align: center;       padding: 20px;    }    function get() {       alert("您好!您剛剛重新整理了文件。");    } HTML onload 事件屬性演示 現在嘗試重新整理此文件。 輸出現在嘗試重新載入文件以觀察 onload 事件屬性的工作方式。

HTML onbeforeprint 事件屬性

AmitDiwan
更新於 2019年9月27日 11:21:27

59 次瀏覽

當頁面即將列印或列印對話框出現在 HTML 文件中之前時,將觸發 HTML onbeforeprint 事件屬性。語法以下是語法 -讓我們來看一個 HTML onbeforeprint 事件屬性的例子 -示例 線上演示    body {       color: #000;       height: 100vh;       background-color: #FBAB7E;       background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%);       text-align: center;       padding: 20px;    }    p {       font-size: 1.1rem;    } HTML onbeforeprint 事件屬性演示 ... 閱讀更多

HTML 表單 method 屬性

AmitDiwan
更新於 2019年9月27日 11:11:23

297 次瀏覽

HTML 表單 method 屬性定義瞭如何傳送表單資料,這意味著要將其作為 URL 變數傳送或作為 HTTP post 事務傳送。語法以下是語法 -此處 get 將表單資料作為 URL 變數傳送,而 post 將表單資料作為 HTTP post 事務傳送。讓我們來看一個 HTML 表單 method 屬性的例子 -示例 線上演示    body {       color: #000;       height: 100vh;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat;       text-align: center;    }    input {       width: 315px; ... 閱讀更多

廣告