JavaScript Tutorial for Beginners - 31 - Reading content using innerHTML

preview_player
Показать описание
In this video we will discuss reading in content using innerHTML and also writing out some more content

Рекомендации по теме
Комментарии
Автор

I did not see the use of creating firstParaText, SecondParaText and add them. If I delete these variables, only using paragraph[2].innerHTML = paragraph[0].innerHTML + paragraph[1].innerHTML; it still works.

zhicongfan
Автор

When we get rid of the lines of text for var firstParaText and SecondParaText why is there any text shown for var addThem when we run the function?. Shouldn't it be blank since var addThem= FirstparaText + secondParaText and these two variables now have empty text?

damianclarke
Автор

I'm having a problem with my submit button. Everything else seems to be fine.

kimricketts
Автор

NVM it works now, found the mistake in my html code

ammarsadeq
Автор

Hi EJ, why cannt we use only firstParaText = " "; to get rid of text why we need to write again paragraph[0].innerHTML with this, hope you get what i am trying to say, thanks

AdvJagvirSinghSorout
Автор

Why do we need to put "VAR" there on variables? Do we need them to be global ?

lazaregiorgobiani
Автор

hello there! how can i read a content from another page (same domain)? for example, while on page A, i want to read something from page B (without opening it), then display it on page A. thanks in advance

georel
Автор

How did you get the addThem variable to show up on the screen? do you have to return it or something, or does it just show up?

davisjameson
Автор

I'm trying to hide the var firstParaText = paragraph[0].innerHTML with the code = "none"; but it doesn't work. Any reason why?

kts
Автор

sir, do we need to write var every time we use the variable?

prakashmohaldar
Автор

okay, I understand this but what exactly do you use this on the webpage for?

SumanSharma-zhmv
Автор

I thought that when writing a function... in order to display the output of the statements you ran in your function you had to use a return or document write statement... There are no statements that return or have document.write, but your function displayed an output.

ammonlyle
Автор

At the end when i click it twice it deletes everything. Should that happen?

franjokeskic
Автор

Hi Ej;
I tried the code and as Cresco NN said it vanished when I clicked twice.So what should be done to stop the text go away.

anuragvikasmishra
welcome to shbcf.ru