答案 0 :(得分:0)
如果您提供代码会更好,但这可能会对您有所帮助:
<button id="myButton" onclick="myFunction()">Click me</button>
<div id="someDiv">
</div>
<script>
function myFunction() {
var img = new Image();
img.src = "path/to/your/image.jpg";
document.getElementById("someDiv").appendChild(img);
document.getElementById("myButton").style.color = "blue";
}
</script>