<html>
<head><meta charset="utf-8"><title>exp</title><style>p{ background-image:url(写你的图片url);}</style></head><body><p id="p"></p><a href="javascript:void(0);" οnclick="hideImg()">点击我隐藏</a><a href="javascript:void(0);" οnclick="showImg()">点击我显示</a><a href=" ">达达寻</a></body></html><script>function hideImg(){ var p = document.getElementById("p");p.style.backgroundImage = "";}function showImg(){ var p = document.getElementById("p");p.style.backgroundImage = "url(写你的图片url)";}</script>