Is it possible to get the value of a non-standard attribute in firefox?
I am trying to capture the value of attribute required. In IE I am able to get the value using document.form.required but in firefox it just returns undefined.

<html>
<head><title></title></head>
<body>
<form id="form" name="form">
<input type="text" name="txt" id="txt" value="val" required="1" />
</form>
</body>
</html>

Thanks in advance.

Is it possible to get the value of a non-standard attribute in firefox?
I am trying to capture the value of attribute required. In IE I am able to get the value using document.form.required but in firefox it just returns undefined.

<html>
<head><title></title></head>
<body>
<form id="form" name="form">
<input type="text" name="txt" id="txt" value="val" required="1" />
</form>
</body>
</html>

Thanks in advance.

Try this:

document.getElementById('txt').attributes['required'].value;


Regards...

This question has already been answered. Start a new discussion instead.