From 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:43:23 -0500 Subject: initial commit --- files/vi/tu-dien-thuat-ngu/jquery/index.html | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 files/vi/tu-dien-thuat-ngu/jquery/index.html (limited to 'files/vi/tu-dien-thuat-ngu/jquery') diff --git a/files/vi/tu-dien-thuat-ngu/jquery/index.html b/files/vi/tu-dien-thuat-ngu/jquery/index.html new file mode 100644 index 0000000000..1477abfb66 --- /dev/null +++ b/files/vi/tu-dien-thuat-ngu/jquery/index.html @@ -0,0 +1,42 @@ +--- +title: jQuery +slug: Tu-dien-thuat-ngu/jQuery +translation_of: Glossary/jQuery +--- +

jQuery là một {{Glossary("JavaScript")}} {{Glossary("Library")}} tập trung vào việc đơn giản hóa thao tác vơi {{Glossary("DOM")}}, gọi {{Glossary("AJAX")}}, và điều khiển {{Glossary("Event")}}.

+ +

jQuery sử dụng định dạng, $(selector).action() để gán một phần tử cho một sự kiện. Để giải thích chi tiết hơn, $(selector) sẽ gọi jQuery để chọn phần tử selector , và gán nó cho một sự kiện {{Glossary("API")}} gọi là .action().

+ +
$(document).ready(function(){
+  alert("Hello World!");
+  $("#blackBox").hide();
+});
+ +

Đoạn mã trên thực hiện chức năng tương tự như đoạn mã sau:

+ +
window.onload = function() {
+  alert("Hello World!");
+  document.getElementById("blackBox").style.display = "none";
+};
+ +

Hoặc:

+ +
window.addEventListener("load", () => {
+  alert("Hello World!");
+  document.getElementById("blackBox").style.display = "none";
+});
+ +

Tìm hiểu thêm

+ +

Kiến thức chung

+ + + +

Thông tin kĩ thuật

+ + -- cgit v1.2.3-54-g00ecf