2019-11-17 01:16:46 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
2019-12-16 22:12:09 +01:00
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Lampensteuerung</title>
|
|
|
|
<script type="text/javascript" src="anim.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function fillAnimElement(animList)
|
|
|
|
{
|
|
|
|
elem = document.getElementById("anim");
|
|
|
|
|
|
|
|
animList.forEach(function(item, index) {
|
|
|
|
opt = new Option(item.name, item.id);
|
|
|
|
//opt.value = item.id;
|
|
|
|
//opt.text = item.name;
|
|
|
|
elem.add(opt);
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function setup()
|
|
|
|
{
|
|
|
|
animList = getAnimList(fillAnimElement);
|
|
|
|
}
|
|
|
|
</script>
|
2019-11-17 01:16:46 +01:00
|
|
|
</head>
|
2019-12-16 22:12:09 +01:00
|
|
|
<body onLoad="setup()">
|
|
|
|
<h1>Lampensteuerung</h1>
|
|
|
|
<form action="#">
|
|
|
|
<p>
|
|
|
|
<label for="anim">Choose animation:</label>
|
|
|
|
<select id="anim">
|
|
|
|
</select>
|
|
|
|
<button onClick="setAnim(document.getElementById('anim').value)">Set</button>
|
|
|
|
</p>
|
|
|
|
</form>
|
2019-11-17 01:16:46 +01:00
|
|
|
</body>
|
2019-12-16 22:12:09 +01:00
|
|
|
</html>
|