google+javascriptbanktwitter@js_bankfacebook@jsbankrss@jsbank






9 hiệu ứng JavaScript vui nhộn nhất thế giới Mọi người đều biết chúng ta có thể tìm thấy nhiều tài nguyên cho mục tiêu giải trí, nhiều niềm vui và hài hước trong môi trường Internet đầy năng động, chẳng hạn như chơi trò chơi trực tuyến, tải nhạc, phim ảnh, ... Trong riêng khía cạnh lập trình, rất nhiều người nghĩ rằng các ngôn ngữ lập trình (kể cả ứng dụng và nền web) chỉ là công cụ để làm việc, nhưng thực tế rất khác, bài viết này là một minh chứng điển hình cho vấn đề tiêu khiển, giải trí với các ngôn ngữ lập trình, cụ thể là JavaScript.

Vui lòng xem bài viết đầy đủ để biết 9 hiệu ứng JavaScript được tác giả cho là vui nhộn nhất thế giới hiện nay.


Miễn phí web hosting 1 năm đầu tại iPage



Nếu bạn vẫn còn đang tìm kiếm một nhà cung cấp hosting đáng tin cậy, tại sao không dành chút thời gian để thử với iPage, chỉ với không quá 40.000 VNĐ/tháng, nhưng bạn sẽ được khuyến mãi kèm với quà tặng trị giá trên 10.000.0000 VNĐ nếu thanh toán cho 24 tháng ~ 900.000 VNĐ?

Có trên 1 triệu khách hàng hiện tại của iPage đã & đang hài lòng với dịch vụ, tuyệt đối chắc chắn bạn cũng sẽ hài lòng giống họ! Quan trọng hơn, khi đăng ký sử dụng web hosting tại iPage thông qua sự giới thiệu của chúng tôi, bạn sẽ được hoàn trả lại toàn bộ số tiền bạn đã sử dụng để mua web hosting tại iPage. Wow, thật tuyệt vời! Bạn không phải tốn bất kì chi phí nào mà vẫn có thể sử dụng miễn phí web hosting chất lượng cao tại iPage trong 12 tháng đầu tiên. Chỉ cần nói chúng tôi biết tài khoản của bạn sau khi đăng ký.

Nếu muốn tìm hiểu thêm về ưu / nhược điểm của iPage, bạn hãy đọc đánh giá của ChọnHostViệt.com nhé!
Thử iPage miễn phí cho năm đầu tiên NGAY

Everybody knows the Internet is the environment that we can use for a lot of things. The Internet is getting more and more important, we can use it for working, learning, for entertaining ...

Only in the aspect of entertainment, we use the Internet to play the online games, to search, listen & download the favorite songs, videos, movies, ...

The Internet also is the very good environment for studying, it helps us in looking for the materials, solving our problems, getting the supports from the other persons, ... Especially in the field of computers in general, the web programming in particular; many people think the programming languages are only for working, there's no joy in it.

That's reason I make this post, I just want to say to all: with JavaScript, you can find some little joys; JavaScript can make many funny things that you ever realize. Here's list of funniest things JavaScript can do.

Updated: April 16th, 2013

1. Pictures flying as a snake around the mouse pointer

Pictures flying as a snake around mouse pointer
Just paste the JavaScript below into the address bar of any browser then press Enter, it makes all pictures on the current web page fly around like a snake when you move the pointer.
javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; var DI= document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5+"px"; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5+"px"}R++}tag=setInterval('A()',5 );document.onmousedown=function(){clearInterval(tag);for(i=0; i<DIL; i++){DI[i].style.position="static";}}; void(0)

In the above JavaScript, you can change
document.getElementsByTagName("img") to any HTML tag that you want to apply.


Here's some another versions of this effect:
javascript:R=0;x1=.1;y1=.05;x2=.25;y2=.24;x3=1.6;y3=.24;x4=300;y4=200;x5=300;y5=200;DI= document.images;DIL=DI.length;function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style;DIS.position='absolute' ;DIS.left=Math.sin(R*x1+ i*x2+x3)* x4+x5;DIS.top=Math.cos(R*y1+ i*y2+y3)* y4+y5;} R++;}setInterval('A()',5);void(0);


2. Transform the web page into the eaditable mode

Transform the web page into the eaditable mode
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
This JavaScript code lets you modify any web page in real-time; and with Firefox, you can even save the modified web pages to your computer. You can do many funny things with the simple JavaScript above, such as: faking the screen capture of some proof, faking some hot news for April Fool's Day... quickly.


3. You must love me

You must love me
Give your lover the link of this effect, then ask her to answer the question "Do you love (marry) me?" and she can't repudiate, lol
<html>

<head>
<title>You must love me</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="copyright" content="http://www.javascriptbank.com" />
<script type="text/javascript">
flag=1
function f1()
{
alert("Yes. you are right ")
}
function f()
{
if(flag==1)
{
Bn.style.top=90
Bn.style.left=500
flag=2
}
else if(flag==2)
{
Bn.style.top=90
Bn.style.left=50
flag=3
}
else if(flag==3)
{
Bn.style.top=235
Bn.style.left=360
flag=1
}
}
</script>
</head>
<body>
<h1 style="position:absolute; left:220px; top:175px; width:auto; height:210px;">Do you love me?</h1>
<div id="By" style="position:absolute; left:285px; top:235px; width:210px;
height:210px;">
<input type="button" value=" YES " onclick="f1undefined)" />
</div>
<div ID="Bn" style="position:absolute; left:360px; top:235px; width:210px; height:210px;">
<input type="button" value=" NO " onmouseover="fundefined)" />
</div>
</BODY>
</html>



Tác giả

Phong Thai Thái Cao Phong theo chuyên ngành phát triển, lập trình web hơn 9 năm qua, đã & đang làm việc với PHP, JavaScript, CSS. Anh ấy là sáng lập viên của JavaScriptBank.com & 9BlogTips.com - cung cấp hàng nghìn mã nguồn JavaScript miễn phí, các thủ thuật lập trình web và các hướng dẫn blog hữu ích.

Hãy theo dõi anh ta tại twitter@js_bank hoặc kết nối qua facebook@jsbank nếu bạn muốn.

DanhNgon.info - Lời hay ý đẹp dành cho cuộc sống
ChonHostViet.com - Đánh giá hosting với gói ưu đãi miễn phí 1 năm đầu

iPhoneKer.com
Save up to 630$ when buy new iPhone 15

GateIO.gomymobi.com
Free Airdrops to Claim, Share Up to $150,000 per Project

https://tooly.win
Open tool hub for free to use by any one for every one with hundreds of tools

chatGPTaz.com, chatGPT4.win, chatGPT2.fun, re-chatGPT.com
Talk to ChatGPT by your mother language

Dall-E-OpenAI.com
Generate creative images automatically with AI

AIVideo-App.com
Render creative video automatically with AI

JavaScript theo ngày


Google Safe Browsing McAfee SiteAdvisor Norton SafeWeb Dr.Web