Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,025

HOME > jQuery > jQuery Selectors > Attribute Contains Prefix Selector [name|="value"] - Selectors , jQuery



Clound SSD Virtual Server

Attribute Contains Prefix Selector [name|="value"] - Selectors , jQuery

Attribute Contains Prefix Selector [name|="value"] เป็นการใช้ Selectors เพื่ออ้างถึง element ที่ attribute ค่าขึ้นต้น Prefix ของ element มีค่าที่กำหนด (Prefix คือ ค่าขึ้นต้น)

Syntax
jQuery('[attribute|="value"]')



Example ตัวอย่างการใช้งาน Attribute Contains Prefix Selector [name|="value"]

ContainsPrefix.html


<html>
<head>
<title>ThaiCreate.Com jQuery Tutorials</title>
  <style>
	  a { display: inline-block; }
  </style>
<script type="text/javascript" src="jquery-1.6.4.js"></script>
<script type="text/javascript">
		$(document).ready(function(){

			$('a[hreflang|="en"]').css('border','3px dotted green');

		});
</script>
</head>
<body>
	  <a href="example.html" hreflang="en">Some text</a> 

	  <a href="example.html" hreflang="en-UK">Some other text</a>

	  <a href="example.html" hreflang="english">will not be outlined</a>
</body>
</html>



Screenshot

Attribute Contains Prefix Selector name|=value

คำอธิบาย (ภาษาไทย)
จากตัวอย่างมีการใช้ a[hreflang|="en"] คืออ้างถึงแท็ก <a> ทั้งหมด ที่มี Prefix หรือคำขึ้นต้น hreflang = "en..." นอกจากนี้ยังสามารถใช้ attribute อื่น ๆ ได้เช่น a[name|="en"] หรือ a[href|="en"] หรือ a[class|="en"]









ลิ้งค์ที่ควรศึกษา
Go to : jQuery Selectors : jQuery Selectors and Element


เกี่ยวกับบทความ
ส่วนหนึ่งของบทความได้เรียบเรียงและแปลจากเว็บไซต์ jQuery.Com โค้ดตัวอย่างคำสั่งนี้อยู่ภายใต้สัญญาอนุญาตของ GFDL สามารถนำโค้ดและคำสั่งใช้งานได้ฟรี สงวนลิขสิทธิ์เฉพาะคำอธิบายภาษาไทย


   
Share


ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท


ลองใช้ค้นหาข้อมูล


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2011-09-22 20:30:32 / 2011-10-01 08:33:35
  Download : No files
 Sponsored Links / Related

 
All Selector ("*") - Selectors , jQuery
Rating :

 
:animated Selector - Selectors , jQuery
Rating :

 
Attribute Contains Selector [name*="value"] - Selectors , jQuery
Rating :

 
Attribute Contains Word Selector [name~="value"] - Selectors , jQuery
Rating :

 
Attribute Ends With Selector [name$="value"] - Selectors , jQuery
Rating :

 
Attribute Equals Selector [name="value"] - Selectors , jQuery
Rating :

 
Attribute Not Equal Selector [name!="value"] - Selectors , jQuery
Rating :

 
Attribute Starts With Selector [name^="value"] - Selectors , jQuery
Rating :

 
:button Selector - Selectors , jQuery
Rating :

 
:checkbox Selector - Selectors , jQuery
Rating :

 
:checked Selector - Selectors , jQuery
Rating :

 
Child Selector ("parent > child") - Selectors , jQuery
Rating :

 
Class Selector (".class") - Selectors , jQuery
Rating :

 
:contains() Selector - Selectors , jQuery
Rating :

 
Descendant Selector ("ancestor descendant") - Selectors , jQuery
Rating :

 
:disabled Selector - Selectors , jQuery
Rating :

 
Element Selector ("element") - Selectors , jQuery
Rating :

 
:empty Selector - Selectors , jQuery
Rating :

 
:enabled Selector - Selectors , jQuery
Rating :

 
:eq() Selector - Selectors , jQuery
Rating :

 
:even Selector - Selectors , jQuery
Rating :

 
:file Selector - Selectors , jQuery
Rating :

 
:first-child Selector - Selectors , jQuery
Rating :

 
:first Selector - Selectors , jQuery
Rating :

 
:focus selector - Selectors , jQuery
Rating :

 
:gt() Selector - Selectors , jQuery
Rating :

 
Has Attribute Selector [name] - Selectors , jQuery
Rating :

 
:has() Selector - Selectors , jQuery
Rating :

 
:header Selector - Selectors , jQuery
Rating :

 
:hidden Selector - Selectors , jQuery
Rating :

 
ID Selector ("#id") - Selectors , jQuery
Rating :

 
:image Selector - Selectors , jQuery
Rating :

 
:input Selector - Selectors , jQuery
Rating :

 
:last-child Selector - Selectors , jQuery
Rating :

 
:last Selector - Selectors , jQuery
Rating :

 
:lt() Selector - Selectors , jQuery
Rating :

 
Multiple Attribute Selector [name="value"][name2="value2"] - Selectors , jQuery
Rating :

 
Multiple Selector ("selector1, selector2, selectorN") - Selectors , jQuery
Rating :

 
Next Adjacent Selector ("prev + next") - Selectors , jQuery
Rating :

 
Next Siblings Selector ("prev ~ siblings") - Selectors , jQuery
Rating :

 
:not() Selector - Selectors , jQuery
Rating :

 
:nth-child() Selector - Selectors , jQuery
Rating :

 
:odd Selector - Selectors , jQuery
Rating :

 
:only-child Selector - Selectors , jQuery
Rating :

 
:parent Selector - Selectors , jQuery
Rating :

 
:password Selector - Selectors , jQuery
Rating :

 
:radio Selector - Selectors , jQuery
Rating :

 
:reset Selector - Selectors , jQuery
Rating :

 
:selected Selector - Selectors , jQuery
Rating :

 
:submit Selector - Selectors , jQuery
Rating :

 
:text Selector - Selectors , jQuery
Rating :

 
:visible Selector - Selectors , jQuery
Rating :


ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 00
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่