IP2Location
and
GeoBytes IP Locator
Read more!
<form action="fake_action" method="POST"> <button name="disable" value="Deactivate Account" type="submit" onclick="click();">Deactivate Account</button> </form>
NAME VALUE disable Deactivate Account
<html>
<head>
<title>A simple form</title>
<script type='text/javascript'>
function test(){
document.forms[0].submit();
}
</script>
</head>
<body>
<form action="formsubmit.php" method="POST">
<input name="disable1" value="Deactivate Account(submit button with onclick)" type="submit" onclick="test()">
<input name="disable2" value="Deactivate Account(submit button w/o onclick)" type="submit">
<button name="enable1" value="Activate Account(submit push button with onclick)" type="submit" onclick="test();">Activate Account(submit push button with onclick)</button>
<button name="enable" value="Activate Account(submit push button w/o onclick)" type="submit">Activate Account(submit push button w/o onclick)</button>
</form>
</body>
</html>
<html>
<head>
<title>Submit Form</title>
</head>
<body>
<?php
foreach ($_POST as $item) {
print $item;
}
?>
</body>
</html>
var newString = str.replace(regexp/substr, newSubStr/function[, flags]);
var string = "hello world, user1 user";
var newString = string.replace("user", "thunder planet");
//the newString is "hello world, thunder planet1 user
var newString1 = string.replace(/user$/, "thunder planet")
//newString1 is "hello world, user1 thunder planet
var string = "hello world user"
var newString = string.replace("user", "$$");
//newString is "hello world $"
var newString1 = string.replace("user", "$&");
//newString1 is the same with string
var newString2 = string.replace("user", "$`");
//newString2 is "hello world hello world"
var newString3 = string.replace("user", "$'");
//newString3 is "hello world "
string = "Hello, John Smith";
var newString4 = string.replace(/(\w+)\s(\w+)$/g, "$2,$1")
//newString4 is "Hello, Smith,John"
function replacer(str, p1, ..., pn, offset, s)
function replacer(str, p1, p2, offset, s){
return "{" + str + "/" + p1 + "/" + p2 + "/" + offset + "/" + s + "}";
}
function replacer1(str, p1, offset, s){
return "{" + str + "/" + p1 + "/" + offset + "/" + s + "}";
}
"XXzzzz---Xz--XXzzz".replace(/(X+)(z+)/g, replacer)
//result is "{XXzzzz/XX/zzzz/0/XXzzzz---Xz--XXzzz}---{Xz/X/z/9/XXzzzz---Xz--XXzzz}--{XXzzz/XX/zzz/13/XXzzzz---Xz--XXzzz}"
"XXzzzz---Xz--XXzzz".replace(/(X+z+)/g, replacer)
//result is "{XXzzzz/XXzzzz/0/XXzzzz---Xz--XXzzz/undefined}---{Xz/Xz/9/XXzzzz---Xz--XXzzz/undefined}--{XXzzz/XXzzz/13/XXzzzz---Xz--XXzzz/undefined}
"XXzzzz---Xz--XXzzz".replace(/(X+z+)/g, replacer1)
//result is "{XXzzzz/XXzzzz/0/XXzzzz---Xz--XXzzz}---{Xz/Xz/9/XXzzzz---Xz--XXzzz}--{XXzzz/XXzzz/13/XXzzzz---Xz--XXzzz}"
"XXzzzz---Xz--XXzzz".replace("Xz", replacer1, "g")
//result is "X{Xz/1/XXzzzz---Xz--XXzzz/undefined}zzz---{Xz/9/XXzzzz---Xz--XXzzz/undefined}--X{Xz/14/XXzzzz---Xz--XXzzz/undefined}zz"
"XXzzzz---Xz--XXzzz".replace(/X+z+/g, replacer1)
//result is "{XXzzzz/0/XXzzzz---Xz--XXzzz/undefined}---{Xz/9/XXzzzz---Xz--XXzzz/undefined}--{XXzzz/13/XXzzzz---Xz--XXzzz/undefined}"