For example:
Copy the Code code as follows:
function say () {
Alert (arguments[0]+ ' said: ' +arguments[1]);
}
Say (' Fanglor ', ' Fanglor are a boy! ');
Result: Pop Fanglor said: Fanglor is a boy!
--------------------------------------------------------------------------------
This is a bit like the Func_get_args () function in PHP, which is also an array to get the function arguments.
Example (the following is the PHP code):
Copy the Code code as follows:
function uses () {
$args =func_get_args ();
if (!empty ($args)) {
foreach ($args as $key = = $val) {
if (file_exists ($val. '. php ')) {
Include "{$val}.php";
} else {
if (DEBUG) {
echo "{$val}.php does not exist! ";
}
}
}
}
}
Package include again
Uses (' config ', ' db ');
Automatic loading of config.php and db.php, if not present, shows {__file__}.php does not exist.
The above describes the Php+javascript javascript,php get function Parameter object code, including the php+javascript aspect of the content, I hope that the PHP tutorial interested in a friend helpful.