Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140220

show text from another div to another div

$
0
0

I want to do so after selection the form did't disappear. The text was created in div2. the problem is simplified so I would like a solution on this code.

<script>

    function writeStandard() {
        document.write('ticket Standard');
    }
    function writeVip() {
        document.write('ticket Vip');
    }
    function show() {
        document.write('<input type="radio" name="ticket" value="standard" onclick="writeStandard()">Standard');
        document.write('<input type="radio" name="ticket" value="vip" onclick="writeVip()">Vip');
    }

</script>

<body>

    <div id="div1">
        <p>select</p>
        <script>
            show();
        </script>
    </div>

    <div id="div2">
        --- I want here the text after clicking ---
    </div>

</body>

Viewing all articles
Browse latest Browse all 140220


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>