I am trying to change an image in my HTML, via an If/else statement, so the page displays an image depending on a value from another script i currently have this code
<script>
if (b.className="yes") {
img src="Site/assets/HappyObama.jpg"
}
else {
img src="Site/assets/SadObama.jpg"
}
how can i fix this? Is there something within Javascript that does this?