0
<!DOCTYPE html>
<html>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<title> teste </title>
<body style="background-color: white">
<form>
Primeiro Nome: <input class="nome1" type="text" name="FirstName" value=""><br>
Segundo Nome: <input class="nome2" type="text" name="LastName" value=""><br>
<input class="enviar" type="submit" value="Submit">
</form>
<script>
$(".enviar").click(function(){
event.preventDefault();
nome1 = $(".nome1").val();
nome2 = $(".nome2").val();
var banco = [
{
nome : nome1,
sobrenome : nome2
}
]
console.log(banco);
$.post("http://localhost:3000/teste", banco, function(){
console.log("ok");
});
});
am running server not Response 404 error ( not found )
Can you help me?
And what would be
http://localhost:3000/teste
? Some page served by Nodejs?– Woss
You can show the code you have on Node.js to handle that url?
– Sergio