javascript - How do you set a variable as the label for an input field? -


here sample input field:

<div class="md-form form-sm">     <input type="text" id="form1" class="form-control">     <label for="form1" class="">example label</label> </div> 

if want set label variable can update it. how that? please bear in mind, i'm new js , jquery , tools i'm using. i'm not using other frameworks , prefer not @ point, unless absolutely necessary.

you're looking dynamic templating framework of somesort. i've used underscore.js , has templating functionality gets job done:

http://underscorejs.org/#template


Comments

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -