What is code for slier in HTML
hello to bulid slider in html you have to use an input tag with range as per required
for 0 to 255 range for controlling led u can use the folllowing code
<head>
<title>Bolt IoT Platform</title>
<script type="text/javascript" src="https://cloud.boltiot.com/static/js/boltCommands.js"></script>
<script>
setKey('{{ApiKey}}','{{Name}}');
</script>
</head>
<body>
<center>
<input type="range" min="0" max="255" value="100" onchange="analogWrite(0, this.value); console.log('this.value');">
<button onClick="digitalWrite(0, 'LOW');">OFF</button>
</center>
</body>
thank you
To add sliders (also known as range inputs) in HTML, you can use the <input>
element with the type="range"
. Here’s a simple example
Slider Example
Value: 50