-
-
Save dryks/adf1a8d54d18ea9d1a793d0c6003cc92 to your computer and use it in GitHub Desktop.
подзагрузка контента файла Php js jquery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// На сервер будет отправлен запрос страницы http://hostname/ajaxtest.php и указаны два параметра. | |
// После получения ответа от сервера будет вызвана функция onAjaxSuccess, которая выведет | |
// на экран сообщение с данными, присланными сервером. | |
$.get( | |
"http://meteo4.com/1day.php", | |
{ | |
param1: "param1", | |
param2: 2 | |
}, | |
onAjaxSuccess | |
); | |
function onAjaxSuccess(data) | |
{ | |
// Здесь мы получаем данные, отправленные сервером и выводим их на экран. | |
alert(data); | |
document.getElementById('dropdown-kv-3-1').innerHTML=data; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment