We have answer of your question!

100% solved queries, no empty question

Question: HTML/JavaScript it won't let me append to a div


0

<html>
<head>
</head>
<body> 

<div id = "start">
<h3>Start</h3>
<script>
    if(Go==false)
        document.write("<p>None </p>");
    else
        document.write("<p>Month: Day: Hour: Min: </p>");
</script>
</div>
<script>

    var change = function(){
        document.getElementById('start').innerHTML +=document.write("<p>NO</p>");
    };
</script>
<input type = "button" value =start onClick = "change(); return false;"/>

<body>
</html>

With this it refreshes the page and I need it to be added to the div "start". Any Ideas? I have been looking up things online with fixes and none seem to work for me. I use chrome, I don't know if that will help.

Question author Alex-wilhelm | Source

Answer


1


Try this:

var change = function(){
    document.getElementById('start').innerHTML += "<p>NO</p>";
};
Answer author Sjkm

Tickanswer.com is providing the only single recommended solution of the question HTML/JavaScript it won't let me append to a div under the categories i.e javascript , html , webpage , . Our team of experts filter the best solution for you.

Related Search Queries:


You may also add your answer

Thanks for contributing an answer to Tick Answer!