Javascript/Mã nguồn JavaScript/Mả Javascript Dòng lệnh

From Wikiversity

Danh Sách Dòng lệnh[edit]

Làm trang chủ[edit]

Chỉ hoạt động tốt trong IE:
 <a href="#" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('location.href');">Làm trang ch</a>

Làm trang ưa thích (favorite)[edit]

Chỉ IE
 <a href="#" onclick="window.external.AddFavorite(location.href, location.href)">Làm trang ưa thích</a>

Tư liệu ngày giờ[edit]

 <a href="#" onclick="alert(new Date());">Tư liu ngày gi</a>

Tư liệu cookie[edit]

 <a href="#" onclick="alert(document.cookie, 'Cookie Setting');">Tư liu cookie</A>

Tư liệu trình duyệt[edit]

<a href="#" onclick='alert("Trình duyệt: "+ navigator.appName + "\n" + "Phiên bản: " + navigator.appVersion + "\n" + "Mã: "  + navigator.appCodeName + "\n" + "Hệ điều hành: " + navigator.platform + "\n"+"Bề rộng màn hình: "+screen.width + "\n" + "Bề cao màn hình: " + screen.height + "\n" + "Bề rộng khung hiển thị trang: " + window.screen.availWidth + "\n" + "Bề cao khung hiển thị trang: " + window.screen.availHeight + "\n" + "Độ sâu màu: " + window.screen.colorDepth + "\n");'>Tư liu trình duyt</a>


Truy tìm thông tin cac trang mạng tim kiếm Yahoo[edit]

<a href="#" onclick="document.location.href='http://search.yahoo.com/search?ei=UTF-8&fr=sfp&p=' + prompt('Tìm kiếm về', 'nhạc');">Tìm thông tin t Yahoo!</a>

Truy tìm thông tin trên trang mạng tim kiếm Vinaseek[edit]

 <a href="#" onclick="document.location.href='http://www.vinaseek.com/search.asp?form=sfr&Kbrd=vni&font=utf8&query=' + prompt('Tìm kiếm về', 'nhạc');">Tìm thông tin t Vinaseek</a>

Dòng lệnh dịch chu Tieng việt sang chu tieng anh trên SAIGON tu dien[edit]

 <a href="#" onclick="document.location.href='http://www.saigon.com:8082/?db=ve&fmt=u&word=' + prompt('Tra từ:', 'anh');">Tìm t dch Vit sang Anh</a><br>

Tìm thông tin thời tiết trên trang mạng http://www.wunderground.com[edit]

<a href="#" onclick="document.location.href='http://www.wunderground.com/cgi-bin/findweather/getForecast?query=' + prompt('Tên thành phố hay mã bưu điện Mỹ:', 'Toronto');">Tìm thông tin thi tiết t Weather Underground</a>

Xem mã nguồn trang mạng IE:[edit]

 <a href="#" onclick="document.location.href='http://www.cyber-junkie.com/cgi-bin/sviewer/sviewer.pl?url=' + prompt('Địa chỉ URL:','http://vi.wikibooks.org/');">Xem mã ngun trang mng</a>

Mozilla, Firefox, Camino:[edit]

 <a href="#" onclick="document.location.href='view-source:' + prompt('Địa chỉ URL:','http://vi.wikibooks.org/');">Xem mã ngun trang mng</a>

Tìm video nhạc hình, phim trên trng mạng video http://www.youtube.com[edit]

 <a href="#" onclick="document.location.href='http://www.youtube.com/results?search_query=' + prompt('Tìm về phim:','Charlie Chaplin');">Tìm video nhc hình, phim t YouTube</a>

Cách sử dụng[edit]

  1. Chọn dòng lệnh
  2. Sao dòng lệnh vào Clipboard (Bảng kẹp)
  3. Dán dòng lệnh vào văn bản

Liên Kết Ngoài[edit]