HTML DOM blur() Method
Complete Checkbox Object Reference
Definition and Usage
The blur() method is used to remove focus from a
checkbox.
Syntax
Example
The following example sets and removes focus from a checkbox:
<html>
<head>
<script type="text/javascript">
function setFocus()
{
document.getElementById('check1').focus()
}
function loseFocus()
{
document.getElementById('check1').blur()
}
</script>
</head>
<body>
<form>
<input type="checkbox" id="check1" />
<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 checkbox
Complete Checkbox Object Reference
The Altova MissionKit is a suite of intelligent XML tools, including:
XMLSpy® – industry-leading XML editor
- Support for all XML-based technologies
- Graphical editing views, powerful debuggers, code generation, & more
MapForce® – graphical data mapping tool
- Drag-and-drop data conversion with code generation
- Support for XML, DBs, EDI, Excel® 2007, text, Web services
StyleVision® – visual stylesheet designer
- Drag-and-drop stylesheet design for XML & databases
- Output to HTML, PDF, RTF, Word 2007, & more
And more…
Try before you buy with a free fully functional 30-day trial
Download today
|