<a href=”javascript:void(0);” onclick=”alert(‘I\’m Huy (\x22huypv.net\x22)’)”>Alert</a>
Explain:
\x22 ~ double quote character ”
Hexa: 22 -> Decimal: 2*16+2 = 34 = char code of double quote
<a href=”javascript:void(0);” onclick=”alert(‘I\’m Huy (\x22huypv.net\x22)’)”>Alert</a>
Explain:
\x22 ~ double quote character ”
Hexa: 22 -> Decimal: 2*16+2 = 34 = char code of double quote
PHP
function myFunction($x, $y) {
$functionName = __FUNCTION__;
if ($functionName != ‘myFunction’) {
echo(‘Oap. Who am I?’);
} else {
echo ‘I love myself’;
}
}
Javascript
function someFunc() {
var ownName = arguments.callee.toString();
ownName = ownName.substr(‘function ‘.length); // trim off “function ”
ownName = ownName.substr(0, ownName.indexOf(‘(‘)); // trim off everything after the function name
alert(ownName);
}