var response; $.get('/index', function (data) { response = $('#otvet', data).get(0); });
var response; $.get('/index', function (data) { response = $('#otvet', data).get(0); alert(response); });
<script type="text/javascript"> var response; $.get('/index', function (data) { response = $('#otvet', data).get(0); alert(response); }); </script>
var response; $.get('/index', function (data) { response = $('#otvet', $(data)).get(0); alert(response); });
<div> <span id="otvet">kjdkf</span> </div>