[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
还有这个,以前发过来自 msdn 的Reference页面地址,自己找找看。
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
以前没有见过统计,这不,一看吓了一跳,这么多好玩的CSS使用方法在IE下用不成,郁闷。
cnbruce
以下为引用内容:
http ://xxx/xxx/default.asp将url里面default.asp前的”/”号改为”%5c”,浏览器会暴露数据库物理地址
我佛山人
以下为引用内容:
conn中用on error resume next绝对路径连接数据库
非JET方式连接
IIS6.0
IIS设置不显示错误信息
所有ASP(包括数据库连接文件conn.asp全放站点要目录下)
上面满足任一条件都不能用%5C暴露数据库路径,这个bug主要是因为IIS的多次解码和Server.MapPath中方法的理解不一致引起的
p.s.第3点还验证过
原文在:
http://www.sitepoint.com/forums/showthread.php?t=90644
那里还有其它一些人的回复,我选了我最喜欢的这段。(以下为引用)
Ok. What I’m about to relate aren’t necessarily rules to be obeyed or anything like that, but just stuff that I’ve learned from my own experiences with coding javascript that, well, make my life easier.
Variables
Always declare variables with var this is just good consistency, and not doing so CAN cause errors in certain situations (it’s a scope issue).
End of lines
Please, use semicolons. I know javascript doesn’t require them, but use them anyways. It makes code easier to read and EVERY other C-based scripting language requires them
Functions and parameters
Whenever possible, use a function. Likewise, if something is variable, use a parameter. Functions and parameters are the basic building blocks for any successful javascript…er…uh…script.
Share the workload
It may seem ironic at first, but 3 short functions are more efficient than one long procedural function. Especially if tasks get repeated. This becomes more important if you start making methods and objects of your own.
Global variables
Did you know that all global variables are also properties of the window object? They are! What does this mean? Well, it means that we can create global variables from inside a function. In fact, let’s make a function that exists JUST to create new global variables
Code:
function makeNewGlobal( varName, val )
{
window[varName] = val;
}
makeNewGlobal( “greeting”, “Hello World!” );
alert( greeting ); // Alerts ‘Hello World!’This concept should go hand-in-hand with the previous topic, Functions and Parameters.
Create references
If you have any code that accesses a DOM object that you need to use more than once, create a reference. It’s for more efficient than running getElementbyId() a bunch of times, or accessing your object via some collection such as images or links. Example
Code:
// Bad way
function changeObject( oId )
{
document.getElementById( oId ).className = ‘blah’;
document.getElementById( oId ).setAttribute( “alt”, “new text” );
}
// Good way
function changeObject( oId )
{
var o = document.getElementById( oId );
o.className = ‘blah’;
o.setAttribute( “alt”, “new text” );
}For those of you that don’t know, my variable o is not a copy of the object or anything like this, but just a label of sorts with which I can use it to address the object it’s referencing. (don’t use the with statement)
The parseInt() function
A very handy function indeed, but what happens here?
Code:
var myString = “010″;
var myNum = parseInt( myString );Does myNum now equal 10? Noooo. myNum is now equal to 8. Why? Becase parseInt does it’s best to guess the proper radix based on the input (8, 10, or 16), and a number like 010 looks octal. It’s the leading zero in the string that trips up parseInt() here. It is not very well known that parseInt can take a second parameter. You guessed it, the radix.
Code:
var myString = “010″;
var myNum = parseInt( myString, 10 );This gives us what we expect, myNum is now equal to 10.
For loops
Always initialize each variable you need, rather than calling on a property in the loop’s conditional. For example, instead of this
Code:
var myString = “Hello”;
for ( var i = 0; i < myString.length; i++ )
{
alert( myString.charAt( i ) );
}Use this
Code:
var myString = "Hello";
for ( var i = 0, len = myString.length; i < len; i++ )
{
alert( myString.charAt( i ) );
}This way, the myString.length property is retrieved only once, and not at each iteration of the loop. Ok, now for my favorite way to do For loops of this nature. Did you know that when you assign a variable a value there is also a return value? That return value is a Boolean indicating if the data was succesfully stored into the variable or not.
Code:
var myString = “Hello”;
for ( var i = 0; ( c = myString.charAt( i ) ); i++ )
{
alert( c );
}Remember, the middle portion of the for loop just needs to evaluate as true for the loop to proceed. Neat, eh?
While loops
I won’t say much here, but if you are performing some type of breaking condition inside a For loop, you probably need a while loop instead.
Switch statements don’t have to break after each case
Sometimes the pesky behavior of switch statements can be a blessing. Imagine that I wanted you to create a function then when passed an integer between 0 and 10 would return a countdown-style string? How would you do it? If you remembered that switch statments proceed until they see a break, you might use one something like this
Code:
function blastoff( timer )
{
var notice = “”;
switch( timer )
{
case 10 : notice += “Ten, “;
case 9 : notice += “Nine, “;
case 8 : notice += “Eight, “;
case 7 : notice += “Seven, “;
case 6 : notice += “Six, “;
case 5 : notice += “Five, “;
case 4 : notice += “Four, “;
case 3 : notice += “Three, “;
case 2 : notice += “Two, “;
case 1 : notice += “One, “;
case 0 : notice += “Zero, “;
default : notice += “Blastoff!”;
}
return notice;
}
alert( blastoff( 10 ) );
alert( blastoff( 5 ) );Our first alert gives us “Ten, Nine, Eight, Seven, Six, Five, Four, Three, Two, One, Zero, Blastoff!” and our second alert gives us “Five, Four, Three, Two, One, Zero, Blastoff!”. Simple, huh?
Popup Window Links
If you are making a link to a popup window, I highly suggest this format
Code:
Click here!This differs somewhat from using the java script: pseudo-protocol or just putting a hash (#) in the href. The method above will still allow the link to be usable if the user has javascript turned off and more importantly, search engine spiders can follow this link
Use bubbling to your advantage
Let’s say that you have about 100 images onto which you want to apply some events, like onmouseover and onmouseover for a rollover-type className change. Instead of attaching each event to each image, use the events bubbling to make your life easy.
Code:
function doRollover( e )
{
// Obtain a reference to the lowest element
var o = ( document.all ) ? event.srcElement : e.target;
// If the element is not what we want, quit the function
if ( o.nodeName != 'IMG' ) return;
// Perform rollover
o.className = ( o.className == 'overClass' ) ? 'outClass' : 'overClass';
}



Confused? Well, because both the onmouseover and onmouseout events bubble, that means that the DIV that contains all our images is hit with the events too, so we can capture thm there, and filter out the events that we don’t want, and keep the ones we do.
Creating HTML strings
If you are creating HTML as a string whether performing an innerHTML operation or whatever, use single quotes to delimit the HTML string. Why? Because proper HTML should have double quotes around attribute values, and using single quotes to delimit the HTML keeps you from having to do lots of escaping.
Regular Expressions
Learn them. Love them. Use them. Get some links here
Consult your references
Always check with documented sources if you are unsure about something. I once spent 2-3 minutes creating a function that would reverse all the items in an array. Lo and behold, the reverse() method for arrays has been around since version 3 browsers.
A Constructor constructor
Here’s a neat little trick for you advanced JS folks out there. Ever wanted to create your own object without having to define a unique constructor function? Well, you can! Check this out…
Code:
function ClassConstructor( props, methods )
{
var prop, meth, fstr=”;
for ( var p=0; (prop = props[p]); p++ )
{
fstr += ‘this.’ + prop + ‘=’ + prop + ‘;’;
}
for ( var m=0; ( meth = methods[m] ); m++ )
{
fstr += ‘this.’ + meth + ‘=’ + meth + ‘;’;
}
return new Function( props, fstr );
}
function pricePerUnit()
{
return Math.round( ( this.price / this.quantity ) * 100 ) / 100;
}
dataprops = ['id','name','price','quantity'];
datamethods = ['pricePerUnit'];
var ShoppingItem = new ClassConstructor( dataprops, datamethods );
var myData = new ShoppingItem( 1, ‘x-widget’, 9.99, 12 );
alert( “The ” + myData.name + ” has a per unit cost of $” + myData.pricePerUnit() + ” dollars.” );Well, I’m sure if I sat here long enough I could come up with a dozen more things, but hey, you guys got what came to my head today
Edit:
2003.08.15 - Two new tips posted!
Conditionals
If you are doing some sort of comparison conditional, where one operand of that conditional is a literal, like if ( someVar == “someString” ) or if ( myNum == 3 ), it’s actually better to list the literal operand first:
if ( “someString” == someVar )
if ( 3 == myNum )
Why? Because if you mistype the equality operator (==) and instead type the assignment operator (=) — a fairly common typo, then you will discover this error at runtime. Tracking down the cause of these errors can be difficult, but switch the order of your operands and the mistake of assigning a variable to a literal error instantly and give a useful line-number (even in IE!)
The hidden power of setTimeout
For some reason, many, many, MANYpeople don’t know that the first argument for the setTimeout (and setInterval) function doesn’t have to be a string. In fact, it is much more powerful when you send a function pointer, or, a reference to a function (passing it by name), instead.
So, instead of
setTimeout( “loop()”, 1000 );
do it this way
setTimeout( loop, 1000 );
Now, if we get creative, we can solve the issue of passing arguments to a setTimeout-called function, which I’ve seen many times. As I’m sure some of you know, the variables you are trying to pass will lose scope (unless they are global). The method to our madness will be the anonymous function.
Once again, instead of
setTimeout( “loop(counter)”, 1000 );
We use
setTimeout( function() { loop(counter); }, 1000 );
I know what you’re thinking — “Why can’t I use setTimeout( loop(counter), 1000 ) ???”. I’ll tell you why: because that, my friend, is a function call, and if you remember, I said we need to pass a function pointer. Since we declare an anonymous function that itself calls loop(), then we are legitimately passing the proper reference, AND maintaining the power to call the function. It’s like having your cake and eating it too!
Here endeth the tips.
Enjoy, and happy coding

大致与Maxthon或者Green Browser相同,都是IE核心的第三方软件。有几点不同
Detachable Toolbars
工具条都可以浮动,我找了半天想把Tab标签页放到上方,设置里怎么都找不到!(在Tab标签页上点右键也不行,Editplus就是这样,也害我找了老半天)原来在不锁定工具栏的情况下,直接拖通就可以了。(上图红线部分就是拖动中的Tab)

Address Bar Right-Click Menu: Right clicking the dropdown list in the address bar allows you to open the selected item in a new window and/or delete the item from the list.
地址栏里面也是可以点右键的。
Full Screen/Desktop Mode: You should try the full screen mode and full desktop mode which can be found in the View menu. All toolbars are auto-hidden whilst you are in these modes.
两个全屏,区别在于是否显示任务栏。

蓝色小圈圈是“实时”的,显示页面下载的进度,:)