// A simple function for sending a message
function sendMessage( msg, obj ) {
// If both a message and an object are provided
if ( arguments.length == 2 )
// Send the message to the object
obj.handleMsg( msg );
// Otherwise, assume that only a message was provided
else
// So just display the default error message
alert( msg );
}
// Call the function with one argument – displaying the message using an alert
sendMessage( "Hello, World!" );
// Otherwise, we can pass in our own object that handles
// a different way of displaying information
sendMessage( "How are you?", {
handleMsg: function( msg ) {
alert( "This is a custom message: " + msg );
}
});
// A function that takes any number of arguments and makes
// an array out of them
function makeArray() {
// The temporary array
var arr = [];
// Go through each of the submitted arguments
for ( var i = 0; i < arguments.length; i++ ) {
arr.push( arguments[i] );
}
// Return the resulting array
return arr;
}
ÆäÖÐÓÐÒ»¶Î
sendMessage( "How are you?", {
handleMsg: function( msg ) {
alert( "This is a custom message: " + msg );
}
});
Õâ¶ÎµÄÓï·¨¿´²»Ì«¶®,ÇëÈËÏêϸ½âÊÍÒ»ÏÂ,µÚ¶þ¸ö²ÎÊýµÄ¶¨ÒåÓï·¨ºÍ¹ý³Ì,ÁíÍâ
ÒÔÏÂÊÇÒ»¶ÎJavsScript½Å±¾£¬µ«ÔËÐÐʱ×Ü»á²úÉú ¡°Microsoft JScript ÔËÐÐʱ´íÎó: 'null' Ϊ¿Õ»ò²»ÊǶÔÏó¡±Òì³££¬´ó¼Ò°ï¿´Ò»Ï¡£
<form id="form1" runat="server">
< ......
ÓÐÒ»¸öjsÎļþ£¬ÊÇʵÏÖÎÄ×Ö¹ö¶¯µÄ£¬ÆäÖеıäÁ¿ÐèÒªµ½mysqlÊý¾Ý¿âÖжÁÈ¡£¬ÄÇôÔõÑùʵÏÖÊý¾Ý¿âÁ¬½Ó¶ø¶ÁÈ¡Êý¾Ý£¿
ÎÒÊDzËÄñ£¬×îºÃÓÐÍêÕûµÄ´úÂëºÍ½âÊÍ£¬Ð»Ð»¸÷λ´óϺ°¡°¡°¡°¡°¡°¡£¡£¡£¡
http://blog.csdn.net/jemlee2002 ......