I am trying to call an img in html and send if off but I can't seem to figure out where I am going wrong. I am sending it off to a <textarea>. (still new at java script)
Here is my HTML
Here is my HTML
Code:
<div id="buttonWrapper"> <div id="button01"> <img id="buttonImage" src="http://bytes.com/imges/font01.png" alt="button01"> </div> <div id="textArea"> <div id="instruction"> <p> *Type a word here, and click diffrent styles and sizes</p> </div> <div id="textSpot" > <textarea name="word">
Here is my javascript
function init(){
document.querySelectorAll("#buttonImage").onclick = changeFont;
function changeFont(){
document.querySelectorAll("word").style.fontFamily = "'Oswald', sans-serif";
}
}
Comment