السلام عليكم ورحمه الله وبركاته
الكود في الاسفل يعطيني القيمة undefined عند تمرير قيمة للدالة show لا اعلم ما السبب
ملاحظة يرجى تضمين ملف jquery.js في نفس المجلد , واصدار الاباتشي الخاص بي Appserv 2.5.10
<html>
<head>
<script src="jquery.js"></script>
<script language="javascript">
// This just displays the first parameter passed to it
// in an alert.
function show(json) {
alert(json);
}
function run() {
$.getJSON(
"/test.php", // The server URL
{ id: 567 }, // Data you want to pass to the server.
show() // The function to call on completion.
);
}
// We'll run the AJAX query when the page loads.
window.onload=run;
</script>
</head>
<body>
JSON Test Page.
</body>
</html>