JS .load method does not work [closed]

-1

Hello, I made this code to test, since it does not work

<script>
$(document).ready(function(){
    $("#button").click(function(){
        $("#div").load('teste.php');
    });
});
</script>

<input type="button" id="button" name="button" value="ADD PAGE">
<div id="div" name="div"></div>

test.php

<?php>
echo 'teste';
?>
    
asked by anonymous 11.03.2017 / 01:49

1 answer

1

The problem is that I did not call JQuery.

I just added this line:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script> 
    
11.03.2017 / 02:03