Home >Web Front-end >HTML Tutorial >Collection Detect the code to display if there is content and comment if there is no content_html/css_WEB-ITnose
I have an article page. The user can choose XXX (which is a hyperlink code), and then the article page template will call this XXX. The code is:
<script type="text/javascript" src="XXX"></script>
If src is empty, the current page will be requested one more time
<head><meta http-equiv="Content-Type" content="text/html; charset=GB2312" /><title>无标题文档</title></head><body><script type="text/javascript" src="1.js"></script><script type="text/javascript" src=""></script><script> function $t(name, cot){ cot = cot || document; return cot.getElementsByTagName(name); } var objs = $t('script'); var href = location.href; for(var i=0,len = objs.length-1; i < len; i++){ if( objs[i].src == href){ document.body.removeChild(objs[i]); } }</script></body></html>
If src is empty, the current page will be requested one more time
HTML code
93f0f5c25f18dab9d176bd4f6de5d30e
7100fa45f28bb6991a414bf73227ab37
b2386ffb911b14667cb8f0f91ea547a7Untitled Document< ;/title>
9c3bca370b5104690d9ef395f2c5f8d1
6c04bd5ca3fcae76e30b72ad730ca86d
a075ef95efd9f29a924984042d3d921d……
Please tell me Next, what is that 1.js?
For testing, it means something is written in src.