last time when i try to rorate img in my file,i got this error,and after taking much time,the answer is clear,that is because when i new a img object,but the ev
playGame.js var x = 7; var y= 6; var initStr = "........X...X....X.X......X......X........"; var conorPos = []; var vistedLen = 0; var allRects = [];
function initRects(x,y,initStr){ var total = x*y; var counter = 0; document.getElementById("gameBoard").innerHTML = ''; for(var i=0;i<x;i++){ var temArr = [];
form link:http://javascript.about.com/od/hintsandtips/a/worst_5.htm <5>eval
eval
The fifth worst Javascript coding used by Javascript novices is to use the eval() method to evaluate variable names. The eval method is just about the least efficient statement that you can use in Javascript and most of the time its use in completely unnecessary.
The most common usage that people make is something along the lines of eval('myVar' + i)
from link:http://javascript.about.com/od/hintsandtips/a/worst_4.htm
<4>document.all
Internet Explorer 4 introduced the document.all DOM (document object model) to allow access to the various parts of the web page. Soon after that the standard DOM method getElementById was introduced and is therefore available in all version 5+ browsers. This means that the document.all references are only needed to support IE4.
Just about no one runs IE4 any more and s
from link:http://javascript.about.com/od/hintsandtips/a/worst_3.htm <3> Browser Detection
The third worst mistake that Javascript beginners make is to use Browser Detection to determine what Javascript code to run on which browser. The problem with doing this is that there are hundreds of different browsers that you would really need to test for in order to get the code exactly right
from link:http://javascript.about.com/od/hintsandtips/a/worst_2.htm
<2>Password Protection:
The second biggest mistake people starting out with Javascript make is to try to use it to set up a password protected area on their site. What most people creating such scripts tend to forget is that Javascript is open source and therefore anyone with a decent knowledge of Javascript can read your Javascript code to find out what the password is that it is testing for (no matter
from link:http://javascript.about.com/od/hintsandtips/a/worst.htm
<1>No Right Click Scripts:
The biggest mistake that people starting out with Javascript make is to try to use it to block their visitors access to the source of their web page. The most common way that they try to do this is using a No Right Click script.
While some of these scripts are effective at disablin
(3)all[] i don't like this attribute actually,because this is not the valid sytax in javascript,i have a eletric book named dhtml,but i think it is very old,if you are a programmer and your code just support one or two browser ,that is ok,but if your codes requires very strict,you shouldn't use this,and this is a topic wroten by a american,the link is :http://javascript.about.com/od/hintsandtips/a/worst_4.htm,what he said is reasonable,so i just copy the conent
last time when i try to rorate img in my file,i got this error,and after taking much time,the answer is clear,that is because when i new a img object,but the ev
playGame.js var x = 7; var y= 6; var initStr = "........X...X....X.X......X......X........"; var conorPos = []; var vistedLen = 0; var allRects = [];
function initRects(x,y,initStr){ var total = x*y; var counter = 0; document.getElementById("gameBoard").innerHTML = ''; for(var i=0;i<x;i++){ var temArr = [];
form link:http://javascript.about.com/od/hintsandtips/a/worst_5.htm <5>eval
eval
The fifth worst Javascript coding used by Javascript novices is to use the eval() method to evaluate variable names. The eval method is just about the least efficient statement that you can use in Javascript and most of the time its use in completely unnecessary.
The most common usage that people make is something along the lines of eval('myVar' + i)
from link:http://javascript.about.com/od/hintsandtips/a/worst_4.htm
<4>document.all
Internet Explorer 4 introduced the document.all DOM (document object model) to allow access to the various parts of the web page. Soon after that the standard DOM method getElementById was introduced and is therefore available in all version 5+ browsers. This means that the document.all references are only needed to support IE4.
Just about no one runs IE4 any more and s
from link:http://javascript.about.com/od/hintsandtips/a/worst_3.htm <3> Browser Detection
The third worst mistake that Javascript beginners make is to use Browser Detection to determine what Javascript code to run on which browser. The problem with doing this is that there are hundreds of different browsers that you would really need to test for in order to get the code exactly right
from link:http://javascript.about.com/od/hintsandtips/a/worst_2.htm
<2>Password Protection:
The second biggest mistake people starting out with Javascript make is to try to use it to set up a password protected area on their site. What most people creating such scripts tend to forget is that Javascript is open source and therefore anyone with a decent knowledge of Javascript can read your Javascript code to find out what the password is that it is testing for (no matter
from link:http://javascript.about.com/od/hintsandtips/a/worst.htm
<1>No Right Click Scripts:
The biggest mistake that people starting out with Javascript make is to try to use it to block their visitors access to the source of their web page. The most common way that they try to do this is using a No Right Click script.
While some of these scripts are effective at disablin
(3)all[] i don't like this attribute actually,because this is not the valid sytax in javascript,i have a eletric book named dhtml,but i think it is very old,if you are a programmer and your code just support one or two browser ,that is ok,but if your codes requires very strict,you shouldn't use this,and this is a topic wroten by a american,the link is :http://javascript.about.com/od/hintsandtips/a/worst_4.htm,what he said is reasonable,so i just copy the conent