user warning: Duplicate entry '536306482' for key 'PRIMARY' query: INSERT INTO accesslog (title, path, url, hostname, uid, sid, timer, timestamp) values('บล็อกของ prajan', 'blog/18563', '', '3.141.42.84', 0, '43b7aa6467d3928cc1aec09d3e29a43e', 580, 1716079588) in /home/tgv/htdocs/modules/statistics/statistics.module on line 63.

บทที่ 10 Document Object

  • JavaScript :: Document Object :: write()

    	write ( string );
    	void
    	ใช้เขียนข้อความลงบนเอกสาร
    	window.document.write ( "<b>welcome</b>" );
    	
  • JavaScript :: Document Object :: URL

    	URL;
    	string, void
    	ใช้กำหนด หรือคืนค่า url ของ web page ที่กำลังเรียกใช้งาน
    	window.document.URL = http://www.bamboolabcode.com;
    	
  • JavaScript :: Document Object :: referrer

    	referrer;
    	string
    	ใช้คืนค่า URL ของ web page ที่โหลด web page ปัจจุบันขึ้นมา
    	alert ( window.document.referrer );
    	
  • JavaScript :: Document Object :: domain

    	domain;
    	string
    	ใช้คืนค่า domain ของ web page นี้
    	alert ( window.document.domain );
    	
  • 	cookie;
    	string, void
    	ใช้กำหนด หรือคืนค่า cookie ที่เกี่ยวข้องกับ web page นี้
    	alert ( window.document.cookie );
    	
  • JavaScript :: Document Object :: title

    	title;
    	string, void
    	ใช้กำหนดค่า หรือคืนค่า title ของ web page นี้
    	window.document.title = "welcome to bamboolabcode";
    	
  • JavaScript :: Document Object :: lastModified

    	lastModified;
    	string
    	ใช้คืนค่า วันและเวลา ที่ทำการแก้ไขไฟล์ครั้งล่าสุด
    	alert ( window.document.lastModified );
    	
  • JavaScript :: Document Object :: bgColor

    	bgColor;
    	string
    	ใช้กำหนดค่า หรือคืนค่า สีพื้นหลังของ web page นี้
    	alert ( window.document.bgColor );
    	
  • JavaScript :: Document Object :: fgColor

    	fgColor;
    	string
    	ใช้กำหนดค่า หรือคืนค่า สีตัวอักษรของ web page นี้	
    	alert ( window.document.fgColor );
    	
  • JavaScript :: Document Object :: linkColor

    	linkColor;
    	string
    	ใช้กำหนดค่า หรือคืนค่า สีของ link ที่ยังไม่ถูกคลิก
    	alert ( window.document.linkColor );
    	
  • JavaScript :: Document Object :: vlinkColor

    	vlinkColor;
    	string, void
    	ใช้กำหนดค่า หรือคืนค่า สีของ link ที่เคยถูกคลิกแล้ว
    	alert ( window.document.vlinkColor );
    	
  • JavaScript :: Document Object :: alinkColor

    	alinkColor;
    	string, void
    	ใช้กำหนดค่า หรือคืนค่า สีของ link ที่กำลังถูกคลิก
    	alert ( window.document.alinkColor );
    	
  • JavaScript :: Document Object :: body

    	body;
    	node, body
    	ใช้กำหนดให้ อ้างถึง element body
    	var tagBody = window.document.body;
    	alert ( tagBody.tagName );
    	
  • JavaScript :: Document Object :: embeds

    	embeds;
    	node array, embed array
    	ใช้กำหนดให้อ้างถึง element embed
    	var tagEmbed = window.document.embeds;
    	alert ( tagEmbed[0].tagName );	
    	
  • JavaScript :: Document Object :: forms

    	forms;
    	node array, form array
    	ใช้กำหนดให้อ้างถึง element form
    	var tagForm = window.document.forms;
    	alert ( tagForm[0].tagName );
    	
  • JavaScript :: Document Object :: images

    	images;
    	node array, image array
    	ใช้กำหนดให้อ้างถึง element image
    	var tagImage = window.document.images;
    	alert ( tagImage[0].tagName );		
    	
  • 	links;
    	node array, link array
    	ใช้กำหนดให้อ้างถึง element link
    	var tagLink = window.document.links;  alert ( tagLink[0].tagName );
    	
  • JavaScript :: Document Object :: styleSheets

    	styleSheets;
    	node array, style array
    	ใช้กำหนดให้อ้างถึง element style
    	var tagStyle = window.document.styleSheets; 
    	alert ( tagStyle[0].tagName );
    	
  • JavaScript :: Document Object :: layers

    	layers;
    	node array, layer array
    	ใช้กำหนดให้อ้างถึง element layer
    	var tagLayer = window.document.layers;  alert ( tagLayer[0].tagName );
    	
  • JavaScript :: Document Object :: documentElement

    	documentElement;
    	node
    	ใช้กำหนดให้อ้างถึง root ของ node ( คือ element html )
    	var tagHTML = document.documentElement;  alert ( tagHTML.tagName );
    	
  • JavaScript :: Document Object :: getElementById()

    	getElementById ( string );
    	node
    	ใช้ในการคืนค่า element ที่มี id ตามที่กำหนด โดยจะเป็นการเข้าถึง element ใด element หนึ่งโดยเฉพาะ
    	var tagDiv = document.getElementById ( "bamboo" );  
    	alert ( tagDiv.tagName );
    	
  • JavaScript :: Document Object :: createElement()

    	createElement ( tag_name );
    	node
    	ใช้สร้าง element node ( สร้าง tag คำสั่งของ html )
    	var tagDiv = document.createElement ( "div" );
    	

บทเรียนทั้งหมด

 
สร้างโดย: 
นางสาวรัชฎา ริ้วทอง และ ด.ช.นิติพงศ์ พงษ์สาครสวัส โรงเรียนสุรวิทยาคาร จ.สุรินทร์

แหล่งอ้างอิง

 

http://www.bamboolabcode.com/javascript/document 

รูปภาพของ ssspoonsak

เพิ่มให้แล้วครับ ต้องขอโทษแทนเด็กๆ ด้วยครับ

-----------------------------------------------------------------------------------------
ครูพูนศักดิ์ สักกทัตติยกุล
ทำด้วยใจ ไปด้วยฝัน

มหาวิทยาลัยศรีปทุม ผู้ใหญ่ใจดี
 

 ช่วยด้วยครับ
นักเรียนที่สร้างบล็อก กรุณาอย่า
คัดลอกข้อมูลจากเว็บอื่นทั้งหมด
ควรนำมาจากหลายๆ เว็บ แล้ววิเคราะห์ สังเคราะห์ และเขียนขึ้นใหม่
หากคัดลอกทั้งหมด จะถูกดำเนินคดี
ตามกฎหมายจากเจ้าของลิขสิทธิ์
มีโทษทั้งจำคุกและปรับในอัตราสูง

ช่วยกันนะครับ 
ไทยกู๊ดวิวจะได้อยู่นานๆ 
ไม่ถูกปิดเสียก่อน

ขอขอบคุณในความร่วมมือครับ

อ่านรายละเอียด

ด่วน...... ขณะนี้
พระราชบัญญัติลิขสิทธิ์ (ฉบับที่ 2) พ.ศ. 2558 
มีผลบังคับใช้แล้ว 
ขอให้นักเรียนและคุณครูที่ใช้งาน
เว็บ thaigoodview ในการส่งการบ้าน
ระมัดระวังการละเมิดลิขสิทธิ์ด้วย
อ่านรายละเอียดที่นี่ครับ

 

สมาชิกที่ออนไลน์

ขณะนี้มี สมาชิก 0 คน และ ผู้เยี่ยมชม 216 คน กำลังออนไลน์