fil79 Posted October 2, 2009 at 06:33 PM Report Share #289681 Posted October 2, 2009 at 06:33 PM Boas Tenho um texto deve ser alterado ao carregar num botão, se fizer um alert da variavel o valor é mudado correctamente mas na página o texto mantêm-se: <script type="text/javascript">document.write(variavel);</script> Desde já agradeço MCITP-MCTS-MCP Link to comment Share on other sites More sharing options...
bruno1234 Posted October 2, 2009 at 07:17 PM Report Share #289689 Posted October 2, 2009 at 07:17 PM Se fizeres isso q tens aí é adicionado esse texto ao documento. O q tu queres é substituir. Experimenta assim: <span id="idQualquer">Texto</span> e no onclick do botão: document.getElementById('idQualquer').innerHtml = 'NovoTexto' Não testei, mas a solução deve ser qq coisa do género. Matraquilhos para Android. Gratuito na Play Store. https://play.google.com/store/apps/details?id=pt.bca.matraquilhos Link to comment Share on other sites More sharing options...
fil79 Posted October 6, 2009 at 11:57 AM Author Report Share #290229 Posted October 6, 2009 at 11:57 AM ok...muito obrigado MCITP-MCTS-MCP Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now