比如下面这个博客地址:
http://blog.sina.com.cn/ynduanlian我点“查看””源文件“,发现”访客“一栏只有这样的代码:
<div class="SG_connBody">
<div class="wdtLoading"><img src="http://simg.sinajs.cn/blog7style/images/common/loading.gif" />加载中…</div> </div> 但实际上,在访问一栏中,如果是AJAX,找来找去也没发现哪有JS代码调用了什么网址?<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://upload.move.blog.sina.com.cn/blog_rebuild/blog/xmlrpc.php?rsd" />
<link href="http://blog.sina.com.cn/blog_rebuild/blog/wlwmanifest.xml" type="application/wlwmanifest+xml" rel="wlwmanifest" />
<link rel="alternate" type="application/rss+xml" href="http://blog.sina.com.cn/rss/1418652555.xml" title="RSS" />我依次打开查看了这些XML文件,并不包括“访客”里的内容啊?再者,如果是AJAX操作,至少这一个DIV应当有个ID吧,没有ID Javascript中怎么控制这一块呢?
http://blog.sina.com.cn/ynduanlian我点“查看””源文件“,发现”访客“一栏只有这样的代码:
<div class="SG_connBody">
<div class="wdtLoading"><img src="http://simg.sinajs.cn/blog7style/images/common/loading.gif" />加载中…</div> </div> 但实际上,在访问一栏中,如果是AJAX,找来找去也没发现哪有JS代码调用了什么网址?<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://upload.move.blog.sina.com.cn/blog_rebuild/blog/xmlrpc.php?rsd" />
<link href="http://blog.sina.com.cn/blog_rebuild/blog/wlwmanifest.xml" type="application/wlwmanifest+xml" rel="wlwmanifest" />
<link rel="alternate" type="application/rss+xml" href="http://blog.sina.com.cn/rss/1418652555.xml" title="RSS" />我依次打开查看了这些XML文件,并不包括“访客”里的内容啊?再者,如果是AJAX操作,至少这一个DIV应当有个ID吧,没有ID Javascript中怎么控制这一块呢?
要获得一个元素的引用,并非必须提供id才行。
getElementsByTagName
比对className='指定类名'
JQuery用选择器:$(".类名")