HTML DOM blur() Method
Complete Radio Object Reference
Definition and Usage
The blur() method is used to remove focus from a radio button.
Syntax
Example
The following example sets and removes focus from a radio button:
<html>
<head>
<script type="text/javascript">
function setFocus()
{
document.getElementById('male').focus()
}
function loseFocus()
{
document.getElementById('male').blur()
}
</script>
</head>
<body>
<form>
Male: <input id="male" type="radio" name="Sex" value="Male" />
<br />
Female: <input id="female" type="radio" name="Sex"
value="Female" />
<br />
<input type="button" onclick="setFocus()" value="Set focus" />
<input type="button" onclick="loseFocus()" value="Lose focus" />
</form>
</body>
</html>
|
Try-It-Yourself Demos
Set
and remove focus from a radio button
Complete Radio Object Reference
Whether you're new to XML or already an advanced user, the user-friendly views
and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to
meet your XML and Web services development needs from start to finish.
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- Support for Office Open XML (OOXML)
- Graphical WSDL editor & SOAP debugger
- Java, C#, C++ code generation
- And much more!
Download a fully functional free 30-day trial today!
|