$(document).ready(function() { $("#id_PASSWORD").prop("type", "password"); $("#id_PASSWORD_2").prop("type", "password"); });