Javascript - Paste specific text to textarea on button click -


i new in javascript. i'm working on django project , want add buttons img button. here example:

enter image description here

so when user click img button in textarea added text :

<img src="[your image]"> 

thanks help.

if understand question correctly have call function in javascript write specified element , on image use onclick.

something like:

onclick="document.location=this.id+'.html' 

sample:

$(function(){     var $display = $('#display');     $display.val(0);      $(document).on('click', 'button.number', function(){         if($display.val() != 0) {             $display.val($display.val() + $(this).val());         } else {             $display.val($(this).val());         }      }); }); 

js fiddle link: http://jsfiddle.net/qohdjovu/

this answered here: using jquery click button , display value of button

script function made by: @r. canser yanbakan


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -