Well, I'm new to JavaScript, and I need to save the value of the matricula field in a variable and pass it on the URL of a getJson. how can I do this? follows the code below the two functions: Code to save enrollment variable:
$(function($){
$('#btn_entrar').click(function(){
var matricula = $('#id_matricula').val();
});
);
Code to call my getJson:
$("#btn_entrar").click(function(event){
$(document).ready(function(){
$.getJSON("URL/'ValorDaVariavelMatricula'", function(data){
});
});
});