看看谷哥是如何做到的?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了看看谷哥是如何做到的?相关的知识,希望对你有一定的参考价值。

http://www.google.com/ig?hl=zh-CN,该页面右键和菜单正常使用,但却看不了页面的源代码,大家讨论讨论。
用一些简单的方法我也能把它的源码给拷下来,但我说的不是这个意思,我是问它如何实现的,我的IE是6.0由sp升级到sp2的,但用常规的方法右键和工具菜单却无法看到源代码,但网页也没有进行禁用。???

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0033)http://www.google.com/ig?hl=zh-CN -->
<HTML><HEAD><TITLE>Google</TITLE>
<SCRIPT>var _IG_time_epoch = (new Date()).getTime();</SCRIPT>

<META http-equiv=content-type content="text/html; charset=UTF-8">
<STYLE>.modbox .el


.modbox .csl
DISPLAY: none

.modbox .es
DISPLAY: none

.modbox_e .el
DISPLAY: none

.modbox_e .csl


.modbox .es


.dm
WIDTH: 1px; POSITION: relative; HEIGHT: 1px

.fres
OVERFLOW: hidden; ; WIDTH: expression(_gel("ffresults").offsetWidth+"px")

.panelo


.panelc


.mod


.unmod


FORM
DISPLAY: inline

.c
CLEAR: both

BODY
FONT-FAMILY: arial,sans-serif

TD
FONT-FAMILY: arial,sans-serif

A
FONT-FAMILY: arial,sans-serif

P
FONT-FAMILY: arial,sans-serif

.h
FONT-FAMILY: arial,sans-serif

A:link
COLOR: #0000cc

A:visited
COLOR: #551a8b

A:active
COLOR: #ff0000

A.ab
COLOR: #0000cc

.q
COLOR: #00c

A.q
COLOR: #00c

H2.modtitle
FONT-WEIGHT: normal; FONT-SIZE: 100%; PADDING-BOTTOM: 0px; MARGIN: 0em; WIDTH: 100%; PADDING-TOP: 0px

.modbox
MARGIN-BOTTOM: 20px; BACKGROUND-COLOR: white

.modbox_e
MARGIN-BOTTOM: 20px; BACKGROUND-COLOR: white

.tlc
TABLE-LAYOUT: fixed; CURSOR: hand

.tlc COL
FONT-SIZE: 82%

.tlc TD
FONT-SIZE: 82%; empty-cells: show

.tls
OVERFLOW: hidden; WHITE-SPACE: nowrap

.tls A
COLOR: black; TEXT-DECORATION: none

.tld
WIDTH: 8ex; WHITE-SPACE: nowrap; TEXT-ALIGN: right

.tlq
OVERFLOW: hidden; WHITE-SPACE: nowrap

#t_1
TABLE-LAYOUT: fixed

#c_1
VERTICAL-ALIGN: top; WIDTH: 32%

#c_2
VERTICAL-ALIGN: top; WIDTH: 32%

#c_3
VERTICAL-ALIGN: top; WIDTH: 32%

.mhdr
PADDING-RIGHT: 0px; BORDER-TOP: #97acd4 1px solid; PADDING-LEFT: 0px; FONT-SIZE: 82%; PADDING-BOTTOM: 0px; MARGIN: 0px; WIDTH: 100%; PADDING-TOP: 0px

.mehdr
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 82%; PADDING-BOTTOM: 0px; MARGIN: 0px; WIDTH: 100%; PADDING-TOP: 0px

.mmhdr
PADDING-RIGHT: 0px; BORDER-TOP: #3366cc 1px solid; PADDING-LEFT: 0px; FONT-SIZE: 12px; PADDING-BOTTOM: 0px; MARGIN: 0px; WIDTH: 167px; PADDING-TOP: 0px

.mttl
PADDING-RIGHT: 5px; PADDING-LEFT: 2px; FONT-WEIGHT: bold; FONT-SIZE: 122%; WIDTH: 90%; BACKGROUND-COLOR: #e5ecf9

.mmttl
PADDING-LEFT: 2px; FONT-SIZE: 12px; WIDTH: 90%; BACKGROUND-COLOR: #e5ecf9

.bbg
BACKGROUND-COLOR: #e5ecf9

.mbbg
WHITE-SPACE: nowrap; BACKGROUND-COLOR: #e5ecf9

.mttli
OVERFLOW: hidden; COLOR: #3366cc; HEIGHT: 1.2em

.medit
PADDING-RIGHT: 2px; WIDTH: 10%; PADDING-TOP: 2px; WHITE-SPACE: nowrap; BACKGROUND-COLOR: #e5ecf9; TEXT-ALIGN: right

.meditbox
BACKGROUND-COLOR: #e5ecf9

.meditbox_inner
PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px

.medit A
COLOR: #97acd4; TEXT-DECORATION: none

.medit A:hover
COLOR: #3366cc

.mttlz
PADDING-RIGHT: 2px; BACKGROUND-COLOR: #e5ecf9

.mttld
PADDING-RIGHT: 2px; BACKGROUND-COLOR: #e5ecf9

.medit
VERTICAL-ALIGN: top

.mttlz
VERTICAL-ALIGN: top

.mttld
VERTICAL-ALIGN: top

.box
MARGIN-TOP: 3px; DISPLAY: block; BACKGROUND-IMAGE: url(/ig/images/x.gif); OVERFLOW: hidden; WIDTH: 12px; CURSOR: pointer; BACKGROUND-REPEAT: no-repeat; HEIGHT: 12px

.delbox
BACKGROUND-IMAGE: url(/ig/images/x_blue.gif)

.minbox
BACKGROUND-IMAGE: url(/ig/images/min_blue.gif)

.maxbox
BACKGROUND-IMAGE: url(/ig/images/max_blue.gif)

A.delbox:hover
BACKGROUND-IMAGE: url(/ig/images/x_blue_highlight.gif)

A.minbox:hover
BACKGROUND-IMAGE: url(/ig/images/min_blue_highlight.gif)

A.maxbox:hover
BACKGROUND-IMAGE: url(/ig/images/max_blue_highlight.gif)

.tabdel
MARGIN-TOP: 1px; MARGIN-LEFT: 2px

.mmdel
BORDER-RIGHT: 0px; BORDER-TOP: 0px; MARGIN-TOP: 2px; VERTICAL-ALIGN: top; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px

.maddm
BORDER-RIGHT: 0px; BORDER-TOP: 0px; MARGIN-TOP: 2px; VERTICAL-ALIGN: top; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px

.mmc
FONT-SIZE: 82%; PADDING-BOTTOM: 1px; WIDTH: 100%; PADDING-TOP: 1px

.mc
FONT-SIZE: 82%; PADDING-BOTTOM: 4px; WIDTH: 100%; PADDING-TOP: 4px

.mpromo
BORDER-RIGHT: #3366cc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #3366cc 1px solid; PADDING-LEFT: 5px; MARGIN-BOTTOM: 20px; PADDING-BOTTOM: 5px; VERTICAL-ALIGN: middle; BORDER-LEFT: #3366cc 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #3366cc 1px solid; BACKGROUND-COLOR: #e5ecf9; TEXT-ALIGN: center

.mpromo_title
PADDING-BOTTOM: 3px

.apromo
BORDER-RIGHT: #3366cc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #3366cc 1px solid; PADDING-LEFT: 5px; FONT-SIZE: 82%; PADDING-BOTTOM: 2px; BORDER-LEFT: #3366cc 1px solid; CURSOR: pointer; COLOR: #0000cc; PADDING-TOP: 2px; BORDER-BOTTOM: #3366cc 1px solid; WHITE-SPACE: nowrap; BACKGROUND-COLOR: #e5ecf9; TEXT-DECORATION: underline

.cpromo
BORDER-RIGHT: #3366cc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #3366cc 1px solid; PADDING-LEFT: 5px; FONT-SIZE: 82%; PADDING-BOTTOM: 2px; BORDER-LEFT: #3366cc 1px solid; CURSOR: pointer; COLOR: #0000cc; PADDING-TOP: 2px; BORDER-BOTTOM: #3366cc 1px solid; WHITE-SPACE: nowrap; BACKGROUND-COLOR: #e5ecf9; TEXT-DECORATION: underline

.apromo
FLOAT: left

.cpromo
FLOAT: right; MARGIN: -1px -2px 0px 0px

#setupbox
BORDER-RIGHT: #3366cc 1px solid; BORDER-TOP: #3366cc 1px solid; MARGIN-BOTTOM: 10px; BORDER-LEFT: #3366cc 1px solid; WIDTH: 95%; BORDER-BOTTOM: #3366cc 1px solid

#demobox
BORDER-RIGHT: #3366cc 1px solid; BORDER-TOP: #3366cc 1px solid; MARGIN-BOTTOM: 10px; BORDER-LEFT: #3366cc 1px solid; WIDTH: 95%; BORDER-BOTTOM: #3366cc 1px solid

.bt
FONT-WEIGHT: bold; FONT-SIZE: 16px; MARGIN-BOTTOM: 5px; COLOR: #3366cc

.setuptd
PADDING-RIGHT: 25px; PADDING-LEFT: 25px; FONT-SIZE: smaller

.mg
FONT-SIZE: smaller; COLOR: #676767

.mg A
COLOR: #7777cc

.promobox
BORDER-RIGHT: #3366cc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #3366cc 1px solid; PADDING-LEFT: 5px; FONT-SIZE: smaller; MARGIN-BOTTOM: 20px; PADDING-BOTTOM: 5px; VERTICAL-ALIGN: middle; BORDER-LEFT: #3366cc 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #3366cc 1px solid

#ehdr_table
PADDING-LEFT: 5px; PADDING-TOP: 8px

#msgs
MARGIN-BOTTOM: 8px; BACKGROUND-COLOR: #ffff99

#undel_msg
PADDING-RIGHT: 10px; PADDING-LEFT: 2px; PADDING-BOTTOM: 10px; PADDING-TOP: 2px

#undel_msg_del A
FONT-WEIGHT: bold; TEXT-DECORATION: none

#undel_msg TABLE
BACKGROUND-COLOR: #ffff99

#no_script
PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; BACKGROUND-COLOR: #fad163

#tip
FONT-SIZE: smaller; PADDING-BOTTOM: 7px; COLOR: #676767; PADDING-TOP: 10px; TEXT-ALIGN: center

#regular_logo
BORDER-RIGHT: 0px; BORDER-TOP: 0px; MARGIN-TOP: 10px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px

#featuretabs
PADDING-RIGHT: 150px; Z-INDEX: 1000; POSITION: relative

.tabspacer
WIDTH: 4px; BORDER-BOTTOM: #97acd4 1px solid

.tab
PADDING-RIGHT: 15px; PADDING-LEFT: 15px; FONT-SIZE: 82%; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #676767; PADDING-TOP: 0px; TEXT-ALIGN: center; TEXT-DECORATION: none; empty-cells: show

.selectedtab
BORDER-RIGHT: #97acd4 1px solid; BORDER-TOP: #97acd4 1px solid; FONT-WEIGHT: bold; BORDER-LEFT: #97acd4 1px solid; COLOR: #3366cc; BORDER-BOTTOM: 0px

.unselectedtab
BORDER-RIGHT: #97acd4 1px solid; BORDER-TOP: #97acd4 1px solid; BORDER-LEFT: #97acd4 1px solid; COLOR: #000000; BORDER-BOTTOM: #97acd4 1px solid; BACKGROUND-COLOR: #e5ecf9

.tab_hover
BORDER-LEFT-COLOR: #3366cc; COLOR: #ffffff; BORDER-TOP-COLOR: #3366cc; BACKGROUND-COLOR: #3366cc; BORDER-RIGHT-COLOR: #3366cc

.edittab
PADDING-RIGHT: 2px; PADDING-LEFT: 2px

.tablink
PADDING-RIGHT: 2px; PADDING-LEFT: 7px; FONT-SIZE: 83%; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #97acd4 1px solid

.addatab
COLOR: #7777cc; TEXT-ALIGN: left

.addatab A
COLOR: #7777cc

.tabdirectorylink
FONT-WEIGHT: bold; TEXT-ALIGN: right

.tabdirectorylinkbottom
PADDING-RIGHT: 2px; PADDING-LEFT: 7px; FONT-WEIGHT: bold; FONT-SIZE: 83%; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; TEXT-ALIGN: right

.tabtitle
FONT-WEIGHT: bold; COLOR: #3366cc

#footer_separator
BORDER-TOP: #97acd4 1px solid

#footer_promos
PADDING-TOP: 10px

#addcontent_button
PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FONT-WEIGHT: bold; FONT-SIZE: 16px; PADDING-BOTTOM: 2px; COLOR: #ffffff; PADDING-TOP: 2px; BACKGROUND-COLOR: #3366cc

#tabs
PADDING-BOTTOM: 9px

.hand
CURSOR: hand

UNKNOWN
BI_NEWLINE:

</STYLE>

<SCRIPT src="Google.files/ig.js"></SCRIPT>

<SCRIPT><!--
var domain = document.location.hostname;var google_pos = domain.indexOf('.google.');if (google_pos > -1) domain = domain.substring(google_pos);document.cookie = "TZ=" + (new Date()).getTimezoneOffset()+ ';path=/;domain=' + domain;var igdnd=document.cookie;if (igdnd.indexOf("IGDND=1")==-1) if(igdnd.length>0) window.location.reload(); else document.cookie="IGDND=0; expires=Thu, 01-Jan-1970 00:00:00 GMT";_et="0hZY-yo5";_source="";_uli=false;_pnlo=false;_mpnlo=false;_pl=false;_mod=false;_pid="";_cbp=true;_upc();// -->
</SCRIPT>

<SCRIPT src="Google.files/ifpc.js"></SCRIPT>

<SCRIPT><!--
function save_chkbox_value(hidden_elem_name, checked) var hidden_elem = document.getElementById(hidden_elem_name);hidden_elem.value = checked ? "1" : "0";function RemoteModule(spec_url, id, render_inline, base_iframe_url,caching_disabled) this.spec_url = spec_url;this.id = id;this.render_inline = render_inline;this.base_iframe_url = base_iframe_url;this.caching_disabled = caching_disabled;this.old_width = 0;this.wants_scaling = false; this.is_inlined = function() return this.base_iframe_url == ""; ;;var remote_modules = [];_IG_RegisterOnloadHandler(function() for (var i=0;i<remote_modules.length;i++)var rm=remote_modules[i];var el=_gel("remote_iframe_"+rm.id);if(el)el.src=rm.base_iframe_url;);function ifpc_resizeIframe(iframe_id, height) var el = document.getElementById(iframe_id);if (el) el.style.height = height + "px";_IFPC.registerService('resize_iframe', ifpc_resizeIframe);function ifpc_setPref(iframe_id, key, value) var module_id = iframe_id.split("_")[2];var prefs = new _IG_Prefs(module_id);prefs.set(key, value);_IFPC.registerService('set_pref', ifpc_setPref);// -->
</SCRIPT>

<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff topMargin=3 marginheight="3">
<DIV id=nhdr>
<TABLE class=panelc cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD noWrap>
<DIV class=mod id=addc></DIV></TD>
<TD noWrap><FONT color=red size=-2></FONT></TD>
<TD width="100%">
<DIV id=gbar>
<DIV style="PADDING-BOTTOM: 4px" align=right noWrap width="100%"><FONT
size=-1><A
href="http://www.google.com/url?sa=p&pref=ig&pval=1&q=/webhp">常规主页</A> | <A
href="https://www.google.com/accounts/ServiceLogin?service=ig&passive=true&continue=http://www.google.com/ig%3Fhl%3Dzh-CN&followup=http://www.google.com/ig%3Fhl%3Dzh-CN&cd=US&hl=zh-CN&nui=1&ltmpl=default">登录</A></FONT></DIV></DIV></TD></TR></TBODY></TABLE>
<SCRIPT><!--
function qs(el) if (window.RegExp && window.encodeURIComponent) var qe=encodeURIComponent(document.f.q.value);if (el.href.indexOf("q=")!=-1) el.href=el.href.replace(new RegExp("q=[^&$]*"),"q="+qe); else el.href+="&q="+qe;return 1;
// -->
</SCRIPT>
<FONT size=-3><BR></FONT>
<DIV id=sf>
<TABLE cellSpacing=0 cellPadding=0 width="1%" align=center border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV id=logo><IMG id=regular_logo height=55 alt=Google
src="Google.files/logo_sm.gif" width=150></DIV></TD>
<FORM id=sfrm style="DISPLAY: inline" name=f action=/search method=get>
<TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=bottom align=middle colSpan=2 height=14>
<DIV id=featuretabs>
<SCRIPT><!--
function qs(el) if (window.RegExp && window.encodeURIComponent) var ue=el.href;var qe=encodeURIComponent(document.f.q.value);if(ue.indexOf("q=")!=-1)el.href=ue.replace(new RegExp("q=[^&$]*"),"q="+qe);elseel.href=ue+"&q="+qe;return 1;
// -->
</SCRIPT>

<TABLE cellSpacing=0 cellPadding=4 border=0>
<TBODY>
<TR>
<TD noWrap><FONT size=-1><B>网页</B>    <A
class=q onclick="return qs(this);"
href="http://www.google.com/imghp?hl=zh-CN&tab=wi">图片</A>    <A
class=q onclick="return qs(this);"
href="http://news.google.com/nwshp?hl=zh-CN&tab=wn">资讯</A>    <A
class=q onclick="return qs(this);"
href="http://groups.google.com/grphp?hl=zh-CN&tab=wg">论坛</A>    <B><A
class=q
href="http://www.google.com/intl/zh-CN/options/">更多 »</A></B></FONT></TD></TR></TBODY></TABLE></DIV></TD></TR>
<TR>
<TD vAlign=top noWrap align=middle>
<DIV id=sbox><INPUT id=hl type=hidden value=zh-CN name=hl><INPUT
id=q maxLength=2048 size=55 name=q></DIV>
<DIV id=btng style="DISPLAY: inline"><INPUT type=submit value="Google 搜索" name=btnG></DIV>
<DIV id=btni style="DISPLAY: inline"><INPUT type=submit value=手气不错 name=btnI></DIV></TD>
<TD vAlign=top noWrap width=150><FONT size=-2>
<DIV id=as>  <A
href="http://www.google.com/advanced_search?hl=zh-CN">高级搜索</A></DIV>
<DIV id=prefs>  <A
href="http://www.google.com/preferences?hl=zh-CN">使用偏好</A></DIV>
<DIV id=lgt>  <A
href="http://www.google.com/language_tools?hl=zh-CN">语言工具</A></DIV></FONT></TD></TR></TBODY></TABLE></TD>
<TD>  </TD></TR>
<TR>
<TD align=middle colSpan=3><FONT size=-1><INPUT id=all type=radio CHECKED
value="" name=lr><LABEL for=all>搜索所有网页</LABEL><INPUT id=ch type=radio
value=lang_zh-CN|lang_zh-TW name=lr><LABEL for=ch>搜索所有中文网页</LABEL><INPUT
id=il type=radio value=lang_zh-CN name=lr><LABEL
for=il>搜索简体中文网页</LABEL></FONT></TD></TR></TBODY></TABLE>
<DIV id=promo></DIV></FORM>  <BR></DIV>
<SCRIPT><!--
if (document.all) _IG_AddEventHandler("focus",function() _gel("q").focus();window.onfocus = null;); else _gel("q").focus();// -->
</SCRIPT>
</DIV>
<DIV id=undel_msg style="DISPLAY: none">
<TABLE cellPadding=5 align=center>
<TBODY>
<TR>
<TD noWrap align=middle><FONT size=-1> <B><SPAN
id=undel_title></SPAN> 部分已删除。<A
href="javascript:void(_undel())">取消</A></B> </FONT></TD>
<TD><A onclick="_gel('undel_msg').style.display='none';"
href="javascript:void(0)"><IMG alt="" src="Google.files/x3.gif"
border=0></A></TD></TR></TBODY></TABLE></DIV><NOSCRIPT>
<CENTER><BR><SPAN id=no_script>您需要启动JavaScript
才能使用本网页,</SPAN><BR></CENTER></NOSCRIPT>
<SCRIPT>_IG_time.stop("parse_header");</SCRIPT>

<DIV align=center>欢迎光临 Google 主页。  <A
href="javascript:_dlsetp('ss=2')">请将其个性化</A>。</DIV><BR>
<DIV id=modules>
<TABLE id=t_1 cellSpacing=10 width="98%" align=center border=0>
<TBODY>
<TR>
<TD id=c_1>
<DIV class=modbox id=m_1 style="POSITION: relative">
<H2 class=modtitle>
<TABLE class=mhdr cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD class=mttl id=m_1_h><A class=mttli id=m_1_url
href="http://book.sina.com.cn/booknews.html">读书新闻-文化新闻</A> </TD>
<TD class=medit id=m_1_e><A class=el
onclick="return _edit('1',null);" href="javascript:void(0)">编辑</A><A
class=csl onclick="return _cedit('1');"
href="javascript:void(0)">取消</A></TD>
<TD class=mttlz><A class="box minbox" id=m_1_zippy
onclick="this.blur();return _zm('1', '25')"
href="javascript:void(0);"></A></TD>
<TD class=mttld><A class="box delbox"
onclick="return _del('1',25,'url=http://rss.sina.com.cn/book/culture10.xml')"
href="javascript:void(0);"></A></TD></TR></TBODY></TABLE>
<TABLE class=mehdr cellSpacing=0 cellPadding=0>
<TBODY>
<TR class=es>
<TD class=meditbox>
<FORM id=m_1_form onsubmit="return _fsetp(this,'1',25)">
<DIV class=meditbox_inner>
<DIV style="WHITE-SPACE: nowrap">显示 <SELECT
onchange="_uhc('1','val',this.value)"><OPTION value=1>1<OPTION
value=2>2<OPTION value=3 selected>3<OPTION value=4>4<OPTION
value=5>5<OPTION value=6>6<OPTION value=7>7<OPTION
value=8>8<OPTION value=9>9</OPTION></SELECT> 项 <INPUT class=submitbtn type=submit value=保存></DIV></DIV></FORM></TD></TR></TBODY></TABLE></H2>
<DIV id=m_1_b style="OVERFLOW: hidden">
<DIV class=mc><A
href="http://book.sina.com.cn/news/c/2006-10-11/1435205330.shtml">书商跟风炮制《黄金甲》
专家认为误导读者</A></DIV>
<DIV class=mc><A
href="http://book.sina.com.cn/news/c/2006-10-11/1428205329.shtml">《黄金甲》出版方回应质疑
称五代题材该热</A></DIV>
<DIV class=mc><A
href="http://book.sina.com.cn/news/c/2006-10-11/1226205328.shtml">散文诗学会群攻赵丽华:梨花诗与当街撒尿何异</A></DIV></DIV></DIV>
<DIV class=modbox id=m_3 style="POSITION: relative">
<H2 class=modtitle>
<TABLE class=mhdr cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD class=mttl id=m_3_h><A class=mttli id=m_3_url
href="http://news.sina.com.cn/iframe/o/allnews/input/index.htm">新闻中心-新闻要闻</A> </TD>
<TD class=medit id=m_3_e><A class=el
onclick="return _edit('3',null);" href="javascript:void(0)">编辑</A><A
class=csl onclick="return _cedit('3');"
href="javascript:void(0)">取消</A></TD>
<TD class=mttlz><A class="box minbox" id=m_3_zippy
onclick="this.blur();return _zm('3', '25')"
href="javascript:void(0);"></A></TD>
<TD class=mttld><A class="box delbox"
onclick="return _del('3',25,'url=http://rss.sina.com.cn/news/marquee/ddt.xml')"
href="javascript:void(0);"></A></TD></TR></TBODY></TABLE>
<TABLE class=mehdr cellSpacing=0 cellPadding=0>
<TBODY>
<TR class=es>
<TD class=meditbox>
<FORM id=m_3_form onsubmit="return _fsetp(this,'3',25)">
<DIV class=meditbox_inner>
<DIV style="WHITE-SPACE: nowrap">显示 <SELECT
onchange="_uhc('3','val',this.value)"><OPTION value=1>1<OPTION
value=2>2<OPTION value=3>3<OPTION value=4>4<OPTION value=5
selected>5<OPTION value=6>6<OPTION value=7>7<OPTION
value=8>8<OPTION value=9>9</OPTION></SELECT> 项 <INPUT class=submitbtn type=submit value=保存></DIV></DIV></FORM></TD></TR></TBODY></TABLE></H2>
<DIV id=m_3_b style="OVERFLOW: hidden">
<DIV class=mc><A
href="http://news.sina.com.cn/w/2006-11-08/174510446700s.shtml">巴基耶夫称颜色革命不会在吉尔吉斯重演</A></DIV>
<DIV class=mc><A
href="http://news.sina.com.cn/w/2006-11-08/165210446583s.shtml">以军炮击加沙
参考技术A d 色丢号放水电费黑丝uhi

用java怎统计windows目录下的文件种类数(后缀名)?相同种类的个数??急用??详细点!!哥是个文盲的!

File f = new File("c:/windows");
List dirs = new ArrayList();
dirs.add(f.listFiles());
for (int i = 0; i < dirs.size(); i ++)
File[] files = (File[])dirs.get(i);
for (int j = 0; j < files.length; j ++)
if (files[j].isDirectory())
dirs.add(files[j].listFiles());
else
String fName = files[j].getName();
String[] ff = fName.split("\\.");
String eName = "":
if (ff.length == 2)
eName = ff[1];

if (fileType.containsKey(eName))
Integer size = (Integer)fileType.get(eName);
size = new Integer(size.intValue() + 1);
fileType.put(eName, size);
else
Integer size = new Integer(1);
fileType.put(eName, size);




for (Iterator key = fileType.keySet().iterator(); key.hasNext(); )
String eName = key.next().toString();
Integer size = (Integer)fileType.get(eName);
System.out.println("扩展名为【" + eName + "】的文件共有" + size + "个");
追问

这程序有问题的哦??有变量没声明!

追答

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

public class Demo
public static void main(String[] args)
File f = new File("c:/windows");
List dirs = new ArrayList();
Map fileType = new HashMap();
dirs.add(f.listFiles());
for (int i = 0; i key = fileType.keySet().iterator(); key.hasNext();)
String eName = key.next().toString();
Integer size = (Integer) fileType.get(eName);
System.out.println("扩展名为【" + eName + "】的文件共有" + size + "个");


参考技术A 楼上的各位童鞋有没有考虑到效率的问题 使用递归追问

你有高效的答案???说来听听!!

参考技术B 有个专业的软件统计的!你可上天网下载! 参考技术C 悬赏太低了点,下课回来做,上课去了

以上是关于看看谷哥是如何做到的?的主要内容,如果未能解决你的问题,请参考以下文章

2021春招面试,已拿到头条跟阿里offer!看看我是如何做到的吧!

喵哥是怎么学习C++的?为什么我能做到没有内存泄漏?

如何测试,看看如果一个变量是一类特殊的一部分?

行业寒冬下逆势拿到50万offer,看看大牛是怎么做到的

系统故障工程师居然可以不背锅?看看几家大厂是怎么做到的!(内附故障复盘模板)

如何更改 UITableViewCell 宽度?