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

Usuário
</form>  
</div>
<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>
  </p>
</div>

.js
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 }
console.log(formData);
alert(JSON.stringify(formData))
// firebase.database().ref().child(‘usuarios’).push(formData);
firebase.database().ref().child(‘usuarios’).push(JSON.stringify(formData))

});

This is wrong

Should be

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

Or

$$(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)