Error in JAVASCRIPT

0

I have the following problem with javascript

And this is the code

$(function(){
	$.post("../php/cargar_marcas.php", function(data){
		$("#marca").html(data);
	});
});

The truth is that I have always done it, the php script works correctly, but I do not know why it is marking me an error in the first line, I have done other functions as well and it is not a problem, I would greatly appreciate your help.

    
asked by Familia Valencia Hdz 06.08.2018 в 21:31
source

1 answer

4

have you added Jquery? it's not like that, include it in the head as well and wing script tag erase some things leave it like this <script src = "../js/marcas.js"></script>

<!DOCTYPE html>
 <html lang = "es"> 
<head>
 <meta charset = "UTF-8">
 <title></title> 
<link rel="stylesheet" href="../css/plantilla_gral.css"> 

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

    

    
answered by 06.08.2018 / 21:39
source