javascript - Change and Input events -



javascript - Change and Input events -

so i'm unable register alter or input events allow me grab info changed , apply somewhere else...

document.getelementbyid("fi").addeventlistener("input", blabla); function blabla() { var = document.getelementbyid("fi").innerhtml; document.getelementbyid("example2").innerhtml = something+" go on rest of script here"; }

this code doesn't execute , can't figure out why documentation...

edit:

this html on page, i'm debugging right now

<textarea id="fi"></textarea> <button type="button" id='pressme'>press me</button> <textarea id="example2"></textarea>

i've used <p> recipient of changed innerhtml

i've tested code on it's own, this, , didn't work, i'm trying connect code event listener too

document.getelementbyid("pressme").addeventlistener("click",dosomething); function dosomething () { var = prompt("please come in something", "something"); if (something !== null) { document.getelementbyid("fi").innerhtml = something; } }

you not retrieving value of textarea correctly. should using .value instead of .innerhtml

var = document.getelementbyid("fi").value;

http://jsfiddle.net/6pl8qony/

javascript events

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -