Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
Hide input html for password with *

I want to hide to password input with asterisk (*). When I use following type :

<input type="password"/>

It hides with '.'(circle) but I want to hide with '*'. How could I change hidden marks?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You can't do that.

The element is presented as a one-line plain text editor control in which the text is obscured so that it cannot be read, usually by replacing each character with a symbol such as the asterisk ("*") or a dot ("•"). This character will vary depending on the user agent and OS.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password

about 4 years ago · Juan Pablo Isaza Report

0

Its not possible to change the symbol using some attributes. It depends on the userAgent and OS. But you still manipulate with the few tweaks.

const inputEl = document.querySelector('input');

const dummyEl = document.querySelector('#dummy');

const resultEl = document.querySelector('#result');

inputEl.addEventListener('keyup', () => {
  const dummyText = Array(inputEl.value.length).fill('*').join('');
  dummyEl.innerHTML = dummyText;
  resultEl.innerHTML = inputEl.value;
})
div {
  position: relative;
}
input {
  color: transparent;
}
span {
  position: absolute;
  top: 7px;
  left: 3px;
}
<div>
  <input type="password" />
  <span id="dummy"></span>
</div>
<div id="result"></div>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!