I would like to calculate the values of Html Range Inputs.
Just want the result to be dynamically changed when the input range change.
The function I write is not clear enough and seems didn't work.
Can anyone can help me please.
Thanks in advance.
Here is my html code:

```
<form>
 Height:
 <input type="range" id="height" onchange="this.setAttribute('value',this.value);" min="0"     max="200" step="0.1" value="0" />
 <br>
 Weight:
 <input type="range" id="weight" onchange="this.setAttribute('value',this.value);" min="0"    max="200" step="0.1" value="0" />
 <br>
</form>
<div id="displaybmi"> Your BMI : </div>

```

Javascript Code

```
function(){
        var height, weight;
        height = $('#height').value;
        weight = $('#weight').value;

        function calbmi(weight,height){
                         bmi = weight/(height*height);
        }   
       document.getElementByID('displaybmi').innerHTML = calbmi(weight,height);

```

}

<http://jsfiddle.net/wm81/935fnmyx/4/>