Kênh 360 Công Nghệ Kênh 360 Công Nghệ

Trang chủ

JavaScript



Lấy số ngẫu nhiên duy nhất trong javascript

Lấy số ngẫu nhiên duy nhất trong javascript

var arr = []
while(arr.length < 8){
  var randomnumber=Math.ceil(Math.random()*100)
  var found=false;
  for(var i=0;i<arr.length;i++){
   ...

Lần cập nhật cuối ( Thứ bảy, 24 Tháng 9 2011 09:26 )
 

String.Format trong JavaScript

Trong lập trình .Net bạn thường sử dụng String.Format để làm việc với chuỗi. Vậy sử dụng String.Format trong javascript như thế nào.

Tạo file js mới định nghĩa các hàm

String.js

function...

Lần cập nhật cuối ( Thứ tư, 21 Tháng 9 2011 15:10 )
 

Get Meta Tag content

Get content Meta Tag, Get Meta Tag description, Get Meta Tag keyword, Get Meta Tag title, Get Meta Tag content


function GetMetaValue(meta_name) {

var my_arr=document.getElementsByTagName("META");
for (var counter=0; counter<my_arr.length...

Lần cập nhật cuối ( Thứ ba, 07 Tháng 6 2011 19:02 )
 

Get window width và window height

Get the window width and height in JavaScript using a cross-browser function that works with all versions of Internet Explorer and Firefox.
GetWidth

function GetWidth(){var x = 0;if (self.innerHeight){x = self.innerWidth;}else if...

Lần cập nhật cuối ( Thứ hai, 30 Tháng 5 2011 09:30 )
 

Tạo hiệu ứng tuyết rơi, hoa rụng trên website bằng javascript

Tạo hiệu ứng tuyết rơi, hoa rụng trên website bằng javascript,
Tạo script tuyết rơi
pictureSrc: đường dẫn file ảnh
<!---tuyet roi--->
<script type="text/javascript">
// <![CDATA[
var pictureSrc...

Lần cập nhật cuối ( Thứ hai, 18 Tháng 4 2011 13:53 )
 
Trang 1 trong tổng số 9 trang.

Kênh 360 công nghệ

  • Nổi bật
  • Tin mới
  • Game mới
  • PrestaShop
English French German Japanese Korean