esp32-sk6812/data/htdocs/index.html

39 lines
792 B
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html>
<head>
<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>
</head>
<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>
</body>
</html>