2018年8月8日 星期三

jQuery attr

jQuery 屬性操作 - attr() 方法


方法描述
addClass()向匹配的元素添加指定的類名。
attr()設置或返回匹配元素的屬性和值。
hasClass()檢查匹配的元素是否擁有指定的類。
html()設置或返回匹配的元素集合中的 HTML 內容。
removeAttr()從所有匹配的元素中移除指定的屬性。
removeClass()從所有匹配的元素中刪除全部或者指定的類。
toggleClass()從匹配的元素中添加或刪除一個類。
val()設置或返回匹配元素的值。
00

jQuery attr

jQuery 屬性操作 - attr() 方法


方法 描述
addClass() 向匹配的元素添加指定的類名。
attr() 設置或返回匹配元素的屬性和值。
hasClass() 檢查匹配的元素是否擁有指定的類。
html() 設置或返回匹配的元素集合中的 HTML 內容。
removeAttr() 從所有匹配的元素中移除指定的屬性。
removeClass() 從所有匹配的元素中刪除全部或者指定的類。
toggleClass() 從匹配的元素中添加或刪除一個類。
val() 設置或返回匹配元素的值。
00

2018年8月7日 星期二

get Browser

get Browser

瀏覽器代號    navigator.appCodeName
瀏覽器名稱    navigator.appName
版本信息        navigator.appVersion
是否啟用        navigator.cookieEnabled
硬件平台        navigator.platform
用戶代理        navigator.userAgent
脫機模式        navigator.onLine
語系編碼        navigator.language
00

get Browser

get Browser

瀏覽器代號    navigator.appCodeName
瀏覽器名稱    navigator.appName
版本信息        navigator.appVersion
是否啟用        navigator.cookieEnabled
硬件平台        navigator.platform
用戶代理        navigator.userAgent
脫機模式        navigator.onLine
語系編碼        navigator.language
00

2018年8月6日 星期一

HTML ul li 項目標籤

HTML <ul> <ol> <li> <dl> <dt> <dd> 項目標籤

HTML <ul> <li> 標籤用來定義一個無排序的項目清單列表。
00
00
00
00
#HTML ul li 項目標籤

HTML ul li 項目標籤

HTML <ul> <ol> <li> <dl> <dt> <dd> 項目標籤

00
00
00
00
00

2018年8月2日 星期四

CSS before after

CSS content 屬性與 :before 及 :after 偽元素配合使用,來插入生成內容。before after

<style>
     .Ap::before {content: "before \21D2"; }
     .Ap::after {content: "\21D0 after"; }
     #hometown::before {   content: ''; }
</style>
<p class="Ap">123456</p>
<p id="hometown">123456</p>

123456

123456

<style>
     .Bp {counter-increment: myIndex; }
     .Bp::before {  content:counter(myIndex) "\21d2" ; }
</style>
<p class="Bp">ABC</p>
<p class="Bp">ABC</p>
<p class="Bp">ABC</p>
<p class="Bp">ABC</p>
<p class="Bp">ABC</p>

ABC

ABC

ABC

ABC

ABC

<style>
a::before {  content: attr(href); }
</style>
<a href="https://html.ug5g.com/2018/08/css-before-after.html">ug5g.com</a>
ug5g.com
<style>
      p::before {  content: open-quote;}
      p::after {  content: close-quote;}
</style>
<p>123456</p>

123456

.A3::before {
  content: url(xxx.jpg);}
.A3::after {  content: url(xxx.jpg);}
</style>
<p class="A3"> 12345 </p>

12345



00
#CSS before after#CSS content#css content:counter

CSS before after

CSS before after

00

document.getElementsByTagName

document.getElementsByTagName()

00

document.getElementsByTagName

document.getElementsByTagName()

00

2018年8月1日 星期三

querySelectorAll

document.querySelectorAll("*") / document.all

00
00
00
00
00
00
#html #網頁格式 #style #div #script querySelectorAll() #script document.all #script CSS selectors #get Selector

2018年7月31日 星期二

color code

color code

#color code#color

color code

color code