mirror of
https://gitlab.com/harald.mueller/aktuelle.kurse.git
synced 2024-11-28 12:41:57 +01:00
31 lines
938 B
HTML
31 lines
938 B
HTML
|
<!DOCTYPE html>
|
||
|
<!https://www.w3schools.com/jquery/ajax_get.asp>
|
||
|
<html>
|
||
|
<head>
|
||
|
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.js""></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() {
|
||
|
$("#btn1").click(function () {
|
||
|
$('#iofield').val("");
|
||
|
$.get( "http://localhost/M133/jquery/jquery6.php", function(data, status, xhr) {
|
||
|
if (status == "success") {
|
||
|
// alert("Daten vorhanden");
|
||
|
returnvalue = data;
|
||
|
alert("Data loaded: " + status);
|
||
|
$('#iofield').val(data); }
|
||
|
else {alert("Keine Daten vorhanden")}
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<h2>Show return value from PHP Call</h2>
|
||
|
<div id='input'>
|
||
|
<input type="text" size="40" id="iofield" name="iofield" />
|
||
|
<input type='button' id='btn1' value='CALL PHP Function return data with $.get()' />
|
||
|
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|