2023年3月22日 星期三

script Math

JavaScript Math Object
是一個擁有數學常數及數學函數。

00
00
00
#html #網頁格式 #script #style #div #script 數字 小數點 toFixed() #script Math.round() #script Math.floor() #script Math.pow() #script Math.sqrt() #script Math.ceil() #script Math.random() 隨機數 #script Math 數字運算() #script Math.random()

setAttribute

element.setAttribute(name, value)
設置指定元素上的一個屬性值。

00
00
#html #網頁格式 #style #script setAttribute() #script setAttribute() 添加指定的属性

2023年3月21日 星期二

createElement()

createElement() 創建元素

00
00
00
00
00
00
#html #網頁格式 #style #div #createElement() 創建元素 #Node.removeChild() #Node.insertBefore() #Node.appendChild( ) #createElement()

parentElement children

children 子元素 / parentElement 父元素

00
00
#html #網頁格式 #style #div #script parentElement #script children #script parentElement 父元素 #script children 子元素 #script nodeObject.parentElement #script nodeObject.children

2023年3月20日 星期一

blur focus

focus() / blur()

00
00
#html #網頁格式 #style #div #script focus() #script blur() #script 獲得焦點 #script 失去焦點

JavaScript Array

JavaScript Array JSON
JSON.stringify(JSON) / Object.keys( ) / Object.values( )

00
00
00

00
00
#html #網頁格式 #style #div #JavaScript array 陣列 #JavaScript Array #html Array #JavaScript Array JSON #html Array JSON #html Object.keys() #JavaScript Object.keys() #html Object.values() #JavaScript Object.values()

2023年3月19日 星期日

input Number Key

input Number Key only
input 僅輸入數字鍵

00
00
00
00
#html #網頁格式 #script #div #input #input 僅輸入數字鍵 #input Number Key only

2023年3月17日 星期五

window open

JavaScript window.open() 開啟新視窗

00
參數 window.open 參數值與說明
toolbar toolbar,預設是要顯示,若不顯示 toolbar=no。
scrollbars scroll bars 要顯示可用參數值 yes,若不顯示請使用參數值 scrollbars=no。
resizable 是否同意網友自己調整新視窗的大小,若不同意請使用參數值 resizable=no。
location 網址欄位顯示控制,預設是要顯示,若不顯示請使用參數值 location=no。
menubar 目錄欄位顯示控制,預設為要顯示,若不顯示請使用參數值 menubar=no。
status 狀態列顯示控制,預設為要顯示,若不顯示請用參數值 status=no。
left 開啟的新視窗靠瀏覽器左邊的距離,單位為 px。
top 開啟的新視窗靠瀏覽器上邊的距離,單位為 px。
width 開啟的新視窗寬度,單位為 px。
height 開啟的新視窗高度,單位為 px。
fullscreen 是否在全屏模式下顯示瀏覽器。 默認是否。 全屏模式下的窗口也必須處於影院模式。
00
#html #網頁格式 #style #div #script window open #script 開新視窗 #document.write()

2023年3月16日 星期四

HTML dd Tag

<dl>、<dt>、<dd> 標籤的層級不同

00
#html #網頁格式 #style #div

pre

HTML <pre﹥ 元素表示預定義格式文本

00
00
#html #網頁格式 #style #div #標簽 排版

  #
 格式文本
  #HTML 


   

2023年3月15日 星期三

string to number

#isNaN #typeof

parseInt() / parseFloat()
文字 轉換 數字

00
00
00
00
00
#html #網頁格式 #style #div #string 文字數字轉換 parseInt() #string 文字數字轉換 parseFloat() #string 文字數字轉換 toString() #string 文字數字型別 typeof #string 文字數字型別 String() #parseInt() string argument and returns an integer #parseFloat() string argument and returns a floating #toString() Convert numbers to strings #typeof typeof type operator #String() input number into a string