Jump to content

Recommended Posts

Posted

Nota: não sei JavaScript

var element = document.getElementById('IDdaDIV');
element.innerHTML = element.innerHTML + '<p>paragrafo extra</p>';

Eo gosto do site https://developer.mozilla.org/en/Gecko_DOM_Reference para identificar os elementos e funções do DOM (Document Object Model)

What have you tried?

Não respondo a dúvidas por PM

A minha bola de cristal está para compor; deve ficar pronta para a semana.

Torna os teus tópicos mais atractivos e legíveis usando a tag CODE para colorir o código!

Posted

var element = document.getElementById('IDdaDIV');
element.innerHTML = element.innerHTML + '<p>paragrafo extra</p>';

Mais correcto

document.getElementById('IDdaDIV').innerHTML = 'texto';

E para acrescentar ao que esta escrito

document.getElementById('IDdaDIV').innerHTML += 'texto';

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.