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.
<html>
<head>
<title>test</title>
<script type="text/javascript">
function move(el, dir) {
var max = el.options.length;
// the selected option
var i1 = el.selectedIndex;
var o1 = el.options[i1];
// the option to switch places with
var i2 = (i1 + dir) % max;
if (i2 < 0) i2 = max - 1;
var o2 = el.options[i2];
// temporarily move o1 to very end
var tmp = el.options[max] = new Option(o1.text, o1.value);
// move o2 to o1
el.options[i1] = new Option(o2.text, o2.value);
// move temp o1 to o2
el.options[i2] = new Option(tmp.text, tmp.value);
// remove temp o1
el.options.length = max;
el.selectedIndex = i2;
}
</script>
</head>
<body>
<form>
<select name="sel" size="9">
<option value="0">zero</option>
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
<option value="4">four</option>
</select>
<input type="button" value="/\" onclick="move(this.form.sel, -1);" />
<input type="button" value="\/" onclick="move(this.form.sel, 1);" />
</form>
</body>
</html>