Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]
<html>
<head>
<title>new document</title>
<script language="javascript" type="text/javascript">
<!--
function tabNext(e, i) {
if (e.keyCode == 13)
document.forms['f'].elements[i].focus();
return false;
}
-->
</script>
<style type="text/css">
</style>
</head>
<body>
<form name="f">
<input type="text" name="t1" onkeypress="return tabNext(event, 't2');" /><br />
<input type="text" name="t2" onkeypress="return tabNext(event, 't3');" /><br />
<input type="text" name="t3" onkeypress="return tabNext(event, 't4');" /><br />
<input type="text" name="t4" onkeypress="return tabNext(event, 's');" /><br />
<input type="submit" name="s" />
</form>
</body>
</html>
/**
* makes the enter key work as tab key on forms
*/
function doEnterToTab(e) {
var evt = e ? e : event;
if (evt.keyCode == 13) {
try {
this.form.elements[this.form.tabOrder[(this.index + 1)]].focus();
} catch(E) {}
return false;
}
}
/**
* attaches doEnterToTab() to form elements,
* except SUBMIT, BUTTON and TEXTAREA
*/
function attachChangeEnter() {
for (var y = 0; y < document.forms.length; y++) {
var f = document.forms[y];
f.tabOrder = [];
var els = f.elements;
for (var x = 0, ndx = 0; x < els.length; x++) {
if (!els[x].type
|| els[x].type.toLowerCase() == "hidden") {
continue;
}
else {
f.tabOrder[f.tabOrder.length] = x;
els[x].index = ndx++;
if (els[x].type.toLowerCase() != "textarea"
&& els[x].type.toLowerCase() != "submit"
&& els[x].type.toLowerCase() != "button")
els[x].onkeyup = doEnterToTab;
}// end else
}// end for x
}// end for y
}// end attachChangeEnter()
if (!window.addEvent) {
// 'borrowed' from mishoo's Calendar
function addEvent(el, evname, func) {
if (el.attachEvent) { // IE
el.attachEvent("on" + evname, func);
} else if (el.addEventListener) { // Gecko / W3C
el.addEventListener(evname, func, true);
} else {
el["on" + evname] = func;
}
}
}
// attach to all forms
addEvent(window, "load", attachChangeEnter);