Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
Docs.jQuery.com каза:success(data, textStatus, XMLHttpRequest)
A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the 'dataType' parameter; a string describing the status; and the XMLHttpRequest object (available as of jQuery 1.4). This is an Ajax Event.
F1r3Fl3x каза:Това са аргументи на функцията, а не функции
Docs.jQuery.com каза:success(data, textStatus, XMLHttpRequest)
A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the 'dataType' parameter; a string describing the status; and the XMLHttpRequest object (available as of jQuery 1.4). This is an Ajax Event.
<?php
$data['index1'] = "teksta, koito iska6 da pokaje6 purvo";
$data['index2'] = "teksta, koito iska6 da pokaje6 vtori";
$data['index3'] = "telsta, koito iska6 da pokaje6 treti";
echo json_encode($data);
?>
success: function(data) {
var json = $.evalJSON(data);
alert(json.index1);
alert(json.index2);
alert(json.index3);
}
var json = $.evalJSON(data);
но аз предпочитам варианта, който ти дадох първоvar json = eval('(' + data + ')');