Js腳本之jQuery學習筆記(1)

Js腳本之jQuery學習筆記(1)

1、javascript基礎

  • 單行註釋javascript

  • 多行註釋 /* */java

  • 數據類型windows

  1. 數值型瀏覽器

  2. 字符串型ide

  3. 布爾型函數

  4. 空值學習

  5. 未定義值spa

  6. 轉義字符orm

函數定義:1234567891011121314<head><script language="javascript"function test(m){var xixi=「嘻嘻」alert("這是javascript")document.write(xixi + m)}</script><head><body><script language="javascript">test("哈哈")</script></body>**流程控制Javascript的流程控制如if、while、try/finaly這些和其餘語言大體同樣,用法同他函數相似。12if (){}內置對象string
  • 方法:對象

  1. indexOf()

  2. toIpperCase()

  3. replace()

內置對象Date
  • 方法:

  1. getYear()

  2. getDay()

瀏覽器對象windows
  • 方法:

  1. window.open()

  2. window.close()

瀏覽器對象document
  • 方法:

  1. write()

  2. getElementById()

screen對象

2、DOM基礎

DOM文檔對象模型,節點樹。對Python中的beautifulSoup理解更深。

DOM的4個接口

  • Document接口

  • Node接口

  • Nodelist接口

  • nameNodemap接口

DOM經常使用對象

  • Document對象

  • Node對象

  • Nodelist對象

  • Element對象

  • Attr對象

相關文章
相關標籤/搜索