Interaction of page / form.html with javascript

Making call from a form.html by routes.js
how can I capture the input information of this form?
I created a new .js file and made the link in index.html …
But when I click the form button it does not call that .js I created!
Where is the declaration error in this?

beginning and end of the form

<div class="block block-strong">
  <p class="row">
    <a href="#" id="btnSalvar" class="col button button-big button-raised" >Salvar</a>
    <a href="#" class="col button button-big button-fill button-raised" id="btnCancelar">Cancelar</a>

var myApp = new Framework7();
var $$ = Dom7;

$$(’#btnSalvar’).on(‘click’,’.button-raised’, function () {
//var formData = app.form.convertToData(’#form-user-content’)
var nameInput = $$(’#nameInput [name=“nameInput”]’).val();
var ageInput = $$(’#ageInput [name=“ageInput”]’).val();
var formData = { name: nameInput, age: ageInput }
// firebase.database().ref().child(‘usuarios’).push(formData);


This is wrong

Should be

$$('#btnSalvar').on('click', function () {


$$(document).on('click', '#btnSalvar', function () {

Thank you
But … I had to use it in my form-user.js file

$$(document).on(‘page-ini’, ‘page [data-name = “form-user”]’, function () {

to get the data of the form (page)