Input Email readOnly Property - Find out if an email field is read-only or not: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Email field

Description

Input Email readOnly Property - Find out if an email field is read-only or not:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

E-mail: <input type="email" id="myEmail" readonly>

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {//from  ww w .j a v  a  2  s. com
    var x = document.getElementById("myEmail").readOnly;
    document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>

Related Tutorials