I want to get the result as shown below.
HTML:
<input oninput="myFunc()" type="range" id="myRange" min="0" max="100"/>
JS:
var a = document.getElementById("myRange");
function myFunc(){
b = document.getElementById("myRange").value;
return b;
}
const exp = b; //Output as input's value(updated-current).
//End
I want the value of b change dyanamically, like in observable as,
//Observable.
//*
{
const exp = b
}
//*
//slider is for demo only
viewof b = slider({
min: 0.5,
max: 8,
step: 0.1,
value: 5,
title: "n"
})
//*
b // Displays current value of rage input.
//END
('//*' is start cell and end cell in observablehq, here only for demo, )
HTML:
<input oninput="myFunc()" type="range" id="myRange" min="0" max="100"/>
JS:
var a = document.getElementById("myRange");
function myFunc(){
b = document.getElementById("myRange").value;
return b;
}
const exp = b; //Output as input's value(updated-current).
//End
I want the value of b change dyanamically, like in observable as,
//Observable.
//*
{
const exp = b
}
//*
//slider is for demo only
viewof b = slider({
min: 0.5,
max: 8,
step: 0.1,
value: 5,
title: "n"
})
//*
b // Displays current value of rage input.
//END
('//*' is start cell and end cell in observablehq, here only for demo, )