HTML/Javascript change div content

Posted by Rob on Stack Overflow See other posts from Stack Overflow or by Rob
Published on 2010-03-31T15:17:53Z Indexed on 2010/03/31 15:23 UTC
Read the original article Hit count: 324

Filed under:
|
|

HI, I have simple HTML code with some javascript, it looks like:

<html>

<head><script type="text/javascript">...</script></head>

<body>

    <input type="radio" name="radiobutton" value="A" onClick="changeDivContent()">
    <input type="radio" name="radiobutton" value="B" onClick="changeDivContent()">

    <div id="content"></div>

</body>

</html>

I just wanted to be able change div's content (it's inner html) with selecting one of "A" or "B" radio buttons, but div#content does not have javascript attribute "value", so I am asking how it can be done.

Thank you!

© Stack Overflow or respective owner

Related posts about html

Related posts about JavaScript