Welcome to making webpages interactive
Want to join the conversation?
- Why doesn't all JS functions work for me in a webpage?(13 votes)
- It may not completely work because of trying not to let people copyright other program online in the browsers.(8 votes)
- How do i get to add JS + ProcessingJS to my webpage(5 votes)
- i know very little about coding. Will this course help me learn the ropes?(3 votes)
- If you do not know the Java Script necessary make interactive webpages try the Intro to Java Script course on Khan Academy.(7 votes)
- I don't really know where else to ask this question, so I'll just do so here.
I've been working on a webpage that the user can input text into, using a
div. What I would like it to do is center the highlighted text when the user clicks a button.
I already have the button and
addEventListenerin place, but the problem is that it will not center the text. I tried using the
.style.textAlign = "center"method, but it failed to work. I tried creating a
<p>tag around the text, then giving it a
classNameto change the
text-alignof, but this also failed to work.
So in short, what I am looking for is a piece of JS code that demonstrates how to center selected text when a button is clicked. I cannot think what to try next, so any help is appreciated.(5 votes)
- Where can you find the hot list.1:48(3 votes)
- Go to Subjects, than go to computer programing.... Than to the hot list!
I hope this helps! :)(2 votes)
- At0:58you said you could use js to controll robots. what is jonny5, and could you teach it on khan academy?(2 votes)
A single google search would have answered this.(3 votes)
- While you don't absolutely have to finish them, finishing at least HTML/CSS will make it much easier to understand. And far less frustrating.(2 votes)
- can u make a computer in khan with it or is it more advanced then this(2 votes)
- There were framesets in previous versions of html. How can we put it now(2 votes)
<iframe>instead. Learn more here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
<iframe>is disabled inside the Khan Academy HTML editor.(2 votes)