if (document.getElementById('show_pic')!=null){document.getElementById('show_pic').src=this.value;}
show_pic is a picture control in the page. We must first ensure that this control exists on the page before we can operate it. Otherwise, an error will occur in JS, so we use this method to make the judgment. I heard from netizens that there are also There is a function that can determine whether an object exists, but unfortunately I didn't find it.