比如:
百度翻译: http://fanyi.baidu.com
.它明明在翻译出来后网页上已经显示了,可为什么查看源文件却没有?
这是如何做到的。

解决方案 »

  1.   

    源文件保存的是网页最初加载的代码,那段html并没有屏蔽掉,你用firebug之类的工具就能看到了~
      

  2.   

    Ajax 之類的技術 返回 json 數據 你模擬提交一下看看能不能返回可以的話 解析 json 就是了。我看有個token
    估計還是有困難的直接post.你可以先取得這個token然後再post 應該就可以了。{"from":"zh", "to":"en", "domain":"0", "type":2, "status":0, "data":[{"dst":"China", "src":"中國", "relation":[], "result":[[0, "China", ["0|6"], [], ["0|6"]]]}]}//===============Host fanyi.baidu.com
    User-Agent Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:10.0) Gecko/20100101 Firefox/10.0 FirePHP/0.6
    Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language zh-cn,zh;q=0.5
    Accept-Encoding gzip, deflate
    Connection keep-alive
    Content-Type application/x-www-form-urlencoded; charset=UTF-8
    X-Requested-With XMLHttpRequest
    Referer http://fanyi.baidu.com/
    Content-Length 117
    Cookie BAIDUID=2F08000D8B3BE762DC5CFE2E130894AC:FG=1
    x-insight activatefrom auto
    ie utf-8
    query 中國
    source txt
    t 1325257554157
    to auto
    token 9b8bb341109338ba7e875bd9a9dd88ba