I have no wrong with the selectors?

Hello. Before was heavily involved in javascript and ajax, it's been many years, trying to figure it out, but stopped for the most basic and stupid. My code is not working on any document.getElementById or $('#id'). What is wrong???

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>

 <script type="text/javascript">

 function SendGet() {

 <div id="result">Here is the response from the server</div><br><br>
 <div onclick="SendGet();">Send GET request via Ajax</div><br>

July 12th 19 at 16:42
3 answers
July 12th 19 at 16:44

Maybe you wanted to write:
$("#result").text('6666'); // instead of text you can use html()
July 12th 19 at 16:46
$("#result")='6666'; - what you want to do??? $("#result").text('6666'); ?

UPD. As on habré - it is necessary to update the comments before sending :)
July 12th 19 at 16:48
Thank you all! With myself in shock.

Find more questions by tags AJAXJavaScript