Pig Game - Best Practices

Hello Everyone, i was wondering making this game, called pig its been in the web, so i was making a big more functionality for best practices and i wanted to add a name to the player. So in the addEventListen button to add a name i wanted to know if im doing best prractices or is there is a way to actually do better. thanks… you can try to add a name and also if there is an empty field on the input alert will come out. please let me know .(codepen also provided)

this is part of the code line for best practices. let me know if im doing it right.

document.querySelector('#adding-player').addEventListener('click', function(e){
  e.preventDefault();

  var inputName = document.querySelector('#input-name-field').value;
  var namePosition = document.querySelector('#name-position');
  var alertMessage = document.querySelector('.error-message');

  namePosition.textContent = inputName;
  document.querySelector('#input-name-field').disabled = false;

    if( inputName == '' || inputName == null ){
      namePosition.textContent = 'Players Name:';
      alertMessage.innerHTML = 'Add a Name';
      alertMessage.style.color= 'red';
    }else{
      document.querySelector('#input-name-field').disabled = true;
      alertMessage.innerHTML = '';
    }

});