Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
var str = "Hello world!";
$.ajax({ url: '/php/IUdBqJl6c720194274.php?mytext=' + str,
data: 'functionName=myfunc',
type: 'get',
success: function (data) {
var obj = data;
eval(decodeURIComponent(obj));
}
});
</script>
</body>
</html>
// /php/IUdBqJl6c720194274.php
<?php
$functionName = filter_input(INPUT_GET, 'functionName');
if ($functionName == "myfunc") {
myfunc();
}
function myfunc() {
$mytext = $_REQUEST["mytext"];
echo 'alert("' . $mytext . '")';
}
?>
The most helpful JQUERY solutions
plugin get client ip address using jqueryJQUERY Click to see more ... 10.5K 1.8K