标签:element java color false font window flag func pre
<script>
window.onload =function () {
var p1= document.getElementById("img");
var flag = false;
p1.onclick = function () {
if(flag){
p1.src="2.jpg"
flag =false;
}else {
p1.src="1.jpg"
flag = true; } } }
</script>
标签:element java color false font window flag func pre
原文地址:https://www.cnblogs.com/xinglingzhiren/p/11146142.html