Galera I understand the basics of BASICS from javascript, my area is PHP. Anyway, when the button is clicked, an input appears, how can I do when I click the button again, this input disappears, and the button changes text?
I clicked the first time > > Input > > the value of the button changes
I clicked the second time > > Input > > the value of the button returns to the default
<div id="inputprogram"></div>
<input class="button" type="button" onclick='insereInput()' value="Programar Notícia" /></div>
<script type="text/javascript">
function insereInput()
{document.getElementById('inputprogram').innerHTML = '<tr> <div class="input_field"><div style="margin-left:69px;"><label for="textfild"><b>Postar em</b>:</label><input required="required" type="text" name="postdate" class="smallfield"> <input required="required" type="text" name="posthora" size="03"><div style="margin-left:115px;"><i> Dia/Mês/Ano Hora:Minuto</i></div></div></div> </tr>';}
</script>