网页框架布局设计_实用的网页设计-框架和框架用法介绍

网页框架布局设计

Ah, frames. We hated them when Netscape first offered them up around 1995; we deplored them when they became all the rage for a few short years; we wish they would go away and never darken our displays again. Well, maybe.

啊,帧。 当Netscape在1995年左右首次提出要约时,我们讨厌他们。 当他们在短短几年内风靡一时时,我们对他们感到遗憾; 我们希望它们能消失并且不再使显示变暗。 也许会。

The debate on frame usage has been raging for eight years now, and while most experts come down solidly against their use in most instances, I won’t continue the debate here. I will say that in my experience on the Web, 90% of the sites that still use frames don’t use them well; I’m still a bit surprised when I find a site that works better with a frame than not.

关于框架使用的争论已经持续了八年之久,尽管大多数专家在大多数情况下都坚决反对使用框架,但是我在这里不再继续讨论。 我会说,根据我在网络上的经验,仍然有90%的网站仍在使用框架,它们使用得不好; 当我找到一个比框架更好的网站时,我仍然感到有些惊讶。

Most people who have come late to Web design or are just learning it now get told, "Frames? Forget ’em! You won’t design a page in frames, they’re hard to get right, and it’s a waste of time for you to learn them." Now, there’s plenty of truth in this statement. It’s not a necessity to learn frame design: many professional Web designers have designed hundreds of elegant, functional sites without a single frame and will go right on designing without giving frames a thought. The percentage of framed sites out there is dropping steadily, especially now that more and more designers are moving towards CSS-based design, which essentially renders the entire concept of frames irrelevant. Note that while HTML 4 includes frames as part of the official code, HTML 4.01 Strict does not support frames, relying instead on style sheets.

大多数迟到Web设计或只是学习Web设计的人现在都会被告知:“框架?忘了他们!您不会在框架中设计页面,他们很难正确地进行设计,而这浪费了时间。你学习它们。” 现在,这句话有很多道理。 学习框架设计不是必需的:许多专业的Web设计师已经设计了数百个没有单个框架的优雅,实用的网站,并且会在设计时不加思考地进行。 框架站点的百分比正在稳步下降,尤其是现在,越来越多的设计师正在转向基于CSS的设计,这从根本上使框架的整个概念无关紧要。 请注意,虽然HTML 4包含框架作为官方代码的一部分,但HTML 4.01 Strict不支持框架,而是依赖样式表。

For a nice compilation of the pros and cons of frames, see Tom Chaplin’s SitePoint article on the subject. It’s a few years old, but still pertinent.

有关框架的优缺点的很好的汇编,请参阅Tom Chaplin的关于该主题的SitePoint文章 。 它已有数年历史,但仍具有针对性。

There are times when a knowledge of frame design is necessary, however. Perhaps your business site uses frames and you’re constrained to operate within company parameters. Perhaps you’ve got a client, or an aunt, who is mad for frames and insists you use a frame-based design. Or maybe you’ve come up with a concept for a design that actually works better in a frame (unlikely as that sounds, it does happen).

但是,有时需要了解框架设计知识。 也许您的企业站点使用框架,并且您不得不在公司参数范围内操作。 也许您有一个客户或一个姨妈,他们为框架而生气,并坚持使用基于框架的设计。 或者,也许您想出了一个实际上可以在框架中更好地工作的设计概念(听起来不太可能发生)。

Frames have their uses, infrequent though they are. So I’ve decided to provide some info on frame design for the novice or intermediate Web designer — some how-tos, along with some observations, caveats and warnings along the way. Frame technique is not that hard, though it’s tricky, and it is worth learning if for no other reason that you’ll know what all the fuss is about.

框架有其用途,尽管很少使用。 因此,我决定为新手或中级Web设计人员提供一些有关框架设计的信息-某些操作方法,以及沿途的一些观察,警告和警告。 帧技术并不难,尽管它很棘手,但如果没有其他原因您会知道所有麻烦的话,则值得学习。

基本设计 (Basic Design)

Frames disrupt the entire fundamental concept for the Web: a large collection of individual pages, linked together with hypertext. …Frames violate too many accepted Web standards to be a worthy information delivery system. — Ross Shannon

框架破坏了Web的整个基本概念:大量单独页面的集合,这些页面与超文本链接在一起。 …框架违反了太多公认的Web标准,因此无法成为有价值的信息传递系统。 罗斯·香农

Frames: just say no. — Jakob Nielsen

镜框:只是说不。 —雅各布·尼尔森(Jakob Nielsen)

It’s hard to argue with those statements. Frames do disrupt the flow of the Web. Ideally, the idea is to surf unencumbered from site to site and page to page without any problem navigating from one location to another. Point, click, peruse the content, point, click, go somewhere else.

这些说法很难争论。 框架确实会干扰Web的流动。 理想情况下,该想法是从一个站点到另一个站点以及从一个页面到另一个页面畅游无阻,而从一个位置导航到另一个位置则没有任何问题。 指向,单击,细读内容,指向,单击,转到其他位置。

The Web is inherently fluid in nature; frames disrupt that paradigm by adding static structure to Web pages. The fluid paradigm shifts the moment you enter a framed page. Content is displayed inside a "corral" of frames, locked inside a barricade of code. Navigation is disrupted; the usual "click in, click out" methodology no longer works. In some older browsers like Netscape 2, even the BACK button didn’t always get you out of a framed page. Thankfully, that little irritant is no longer a factor, since browsers that don’t handle frames well have all but disappeared from the pool of browsers currently in use, with the notable exception of Lynx, which displays the content of the NOFRAMES page and provides labeled links to the framed content.

网络本质上是可变的。 框架通过向网页添加静态结构来破坏该范例。 流畅的范式改变了您进入带框页面的时间。 内容显示在框架的“围栏”中,并锁定在代码屏障中。 导航中断; 通常的“点击,点击”方法不再起作用。 在某些较旧的浏览器(如Netscape 2)中,即使“返回”按钮也不总是使您脱离框架页面。 幸运的是,这种刺激性不再是一个因素,因为不能很好地处理框架的浏览器几乎全部从当前使用的浏览器池中消失了,Lynx例外,它显示了NOFRAMES页面的内容并提供了带标签的指向框架内容的链接。

Bookmarking doesn’t always work; instead of marking the specific URL of the framed content, you’ve just bookmarked the frameset, which may have a different URL and may not contain the same content upon your return. Copying a frame’s URL for use as a hyperlink in another page may not send a visitor to the proper page, since the framed page’s URL doesn’t display; only the frameset URL displays. Printing a framed page doesn’t always work well. Cookies don’t track frameset pages well. Framed content displays quite poorly on smaller screens such as notebooks and handhelds.

书签并非总是有效。 您无需标记框架内容的特定URL,而只是将框架集添加为书签,该框架集可能具有不同的URL,并且在返回时可能不包含相同的内容。 复制框架的URL以用作其他页面的超链接,可能不会将访问者发送到正确的页面,因为框架页面的URL不显示。 仅显示框架集URL。 打印带框的页面并不总是能正常工作。 Cookies无法很好地跟踪框架集页面。 带边框的内容在较小的屏幕(如笔记本电脑和手持设备)上的显示效果很差。

Probably the biggest irritant of frames is the occasional framed page that won’t let you out once you’ve entered; it insists (whether because of poor design or intent) on displaying every other page you go to within its own frameset. This last is a technically defensible choice for some commercial sites that want to keep their own navigational setup or advertising content always in front of visitors, but it’s not a good choice. Trapping visitors within your site’s frames is the best way to aggravate them into leaving your site as quickly as possible — even if that includes closing the browser completely and starting to surf from scratch.

可能是最大的框架刺激因素是偶然的带框架页面,一旦进入页面就不会让您失望。 它坚持(无论是由于设计不良还是出于意图)在您自己的框架集中显示您要访问的所有其他页面。 对于某些希望将自己的导航设置或广告内容始终保持在访问者面前的商业站点,这是一个技术上可行的选择,但这不是一个好选择。 在网站框架内诱捕访客是使他们尽快离开网站的最好方法,即使这包括完全关闭浏览器并从头开始冲浪也是如此。

There are also the considerations of additional server load and page maintenance. A framed page often takes up more server space than a non-framed alternative, and those frames also add load time to the page. A bunch of framed pages can be more difficult and time-consuming to modify. And when you create a new frameset, you’ll have a minimum of two (with just one frame — more if you have more frames) hits to the server from a single visit. With more framesets, you generate more hits to the server without generating additional page views. This can cause problems if you can accept a limited amount of traffic to your site; it can also can play havoc with your attempt to keep track of site visitations.

还有其他服务器负载和页面维护的注意事项。 带框架的页面通常比无框架的页面占用更多的服务器空间,并且这些框架还增加了页面的加载时间。 一堆带有框架的页面可能更难修改,而且耗时。 并且,当您创建新的框架集时,一次访问服务器的命中次数最少为2(只有一帧,如果有更多帧,则为更多)。 使用更多框架集,您可以对服务器生成更多匹配,而无需生成其他页面视图。 如果您可以接受有限的网站访问量,则可能会导致问题。 它还可能会破坏您对网站访问的跟踪。

Now, there are some situations where frames represent a reasonable solution. One is the presentation of a long document divided into chapters or blocks. A simple, workable solution is to build a frameset with two columns, where the left side offers navigational links, while the right side displays the actual chapters of content. Clicking on a link in the left-hand frame causes a particular chapter to display in the right-hand frame. This avoids having a horribly long document that may take too much time to display, and displays the content in manageable chunks. Is using a frameset the only solution to such content? Of course not, but it is one feasible method.

现在,在某些情况下框架代表了合理的解决方案。 一种是将长文件分为几章或几节的介绍。 一个简单可行的解决方案是用两列构建框架集,其中左侧提供导航链接,而右侧显示内容的实际章节。 单击左侧框架中的链接会使特定章节显示在右侧框架中。 这样可以避免显示冗长的文档,而该文档可能要花费太多时间才能显示,并且以可管理的块形式显示内容。 使用框架集是此类内容的唯一解决方案吗? 当然不是,但这是一种可行的方法。

A frameset used with an outsourced shopping cart is another useful possibility. If you use separate frames for your banner or logo, navigation, and content, and incorporate the shopping cart in the content page, even if the outsourced shopping cart doesn’t use your logo or navigational material, your site still works well and has the proper look and feel.

与外包购物车一起使用的框架集是另一种有用的可能性。 如果您对横幅或徽标,导航和内容使用单独的框架,并且将购物车合并到内容页面中,即使外包的购物车未使用徽标或导航材料,则您的网站仍然可以正常运行并具有适当的外观。

The point is, frames are considered bugbears of Web design not because they are useless, but because they’ve been so horribly misused in the past (and the present, and will probably be well into the future). Remember, the basic idea behind a frame is to keep some information permanently visible while viewing other information that is subject to change. When this works well, it allows the viewer to keep, say, a navigational window, a table of contents, an advertisement, or a title bar (or a combination of these elements) in place while they access different areas of the site. For commercial sites, this can be useful for keeping your company’s logo or navigation, or an advertisement in front of the viewer at all times. For non-commercial sites, this is probably most useful for keeping navigational or other information always handy, as opposed to placing a menu on each page (the choice of most designers, by the way).

关键是,框架被认为是Web设计的负担,不是因为它们没有用,而是因为它们在过去(和现在,以及很可能在将来)被严重滥用。 请记住,框架背后的基本思想是在查看其他可能更改的信息时,使某些信息永久可见。 如果效果良好,则允许观看者在访问站点的不同区域时将导航窗口,目录,广告或标题栏(或这些元素的组合)保留在适当的位置。 对于商业站点,这对于始终将公司的徽标或导航或广告保持在查看者面前非常有用。 对于非商业站点,这对于使导航或其他信息始终保持方便最为有用,这与在每个页面上放置菜单相反(顺便说一下,大多数设计师的选择)。

At its worst, you can get locked into "frame hell," where badly designed or deliberately constrictive framesets lock you into a site with no way out. Back buttons don’t work like they ought to, navigating through the site itself is nightmarish, the frames replicate themselves one inside another, and even typing a brand new URL in the address bar opens the new site inside the old frame. Now that’s annoying.

在最坏的情况下,您可能会陷入“框架地狱”,在这种情况下,设计不良或故意限制框架集会使您无法进入站点。 后退按钮无法正常工作,浏览网站本身是噩梦般的,框架相互复制,甚至在地址栏中键入全新的URL也会在旧框架内打开新站点。 现在这很烦人。

If you’re going to use a frameset, make sure your content lends itself to framed display. Is there another way to display it? And think about your audience. While even though almost everyone now uses frames-capable browsers, some people don’t like frames and run like scalded cats when a frames site appears on their screen. For these people, frames are like Kryptonite to Superman. You won’t get far arguing with them; your best bet is to give them a </code> alternative, or just design your site without frames from the outset.</p> <p> 如果要使用框架集,请确保您的内容适合框架显示。 还有另一种显示方式吗? 考虑一下你的听众。 尽管现在几乎每个人都使用支持框架的浏览器,但是当屏幕上出现框架站点时,有些人不喜欢框架,像烫伤的猫一样奔跑。 对于这些人来说,镜框就像是超人的K石。 您不会和他们争论不休; 最好的选择是为他们提供<code><noframes></code>替代方案,或者只是从一开始就设计没有框架的网站。 </p> <p>Let’s say you want to build a site using frames, for whatever reason. Okay, how do you do it?</p> <p> 假设您出于某种原因想要使用框架来构建网站。 好吧,你怎么做? </p> <p>Note: I usually advocate trying the code out as we go along in your own HTML code editor. You should do this here, too, but you’re going to have to construct several HTML files to serve as the frame source files, otherwise you won’t see anything. Probably the easiest way to do this is to create a few simple HTML files with no <code><body></code> content and different <code><body> bgcolor</code> attributes, just so something will show up. </p> <p> 注意:通常,我们建议您在自己HTML代码编辑器中尝试代码。 您也应该在这里执行此操作,但是您将必须构造多个HTML文件作为框架源文件,否则您将看不到任何内容。 可能最简单的方法是创建一些没有<code><body></code>内容且具有不同的<code><body> bgcolor</code>属性的简单HTML文件,以便显示一些内容。 </p> <p>To use the example code below, try constructing the following pages: your index.html page, which will be your frameset page, and six content pages: </p> <p> 要使用下面的示例代码,请尝试构建以下页面:index.html页面(将是框架集页面)和六个内容页面: </p> <ul> <li>leftside.html, <p class="nodelete"></p> leftside.html, </li> <li>mainpage.html, <p class="nodelete"></p> mainpage.html, </li> <li>rightside.html, <p class="nodelete"></p> rightside.html, </li> <li>title.html, <p class="nodelete"></p> title.html, </li> <li>navigation.html, and <p class="nodelete"></p> navigation.html,以及 </li> <li>moreinfo.html. <p class="nodelete"></p> moreinfo.html。 </li> </ul> <p>None of these pages needs any text or graphical content unless you really want to put some content in them. Just give them different background colors so they will differentiate themselves on your screen.</p> <p> 这些页面都不需要任何文本或图形内容,除非您确实要在其中放置一些内容。 只需给它们提供不同的背景颜色,这样它们就可以在屏幕上与众不同。 </p> <h5> 基本框架构造 <span style="font-weight: bold;">(</span>Basic Frame Construction<span style="font-weight: bold;">)</span></h5> <p>First off, you have to use the proper frames DOCTYPE. For HTML 4 documents, it’s:</p> <p> 首先,您必须使用适当的框架DOCTYPE。 对于HTML 4文档,它是: </p> <pre class="has"><code><DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 FRAMESET//EN" "http://www.w3c.org/TR/html4/frameset.dtd"></code></pre> <p>This is a variant of the HTML 4 Transitional doctype.</p> <p> 这是HTML 4 Transitional doctype的变体。 </p> <p>For XHTML 1.0 documents, the doctype is:</p> <p> 对于XHTML 1.0文档,文档类型为: </p> <pre class="has"><code><DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 FRAMESET//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"></code><p>Remember, since earlier versions of HTML don't officially support frames, if for some reason you haven't disembarked from the Wayback Machine and are still writing pages to be viewed in HTML 3.2 or earlier, you don't need a specific doctype to write framed pages. Most modern browsers will support the frames and their content anyway, but don't expect 100% compliance by any means.</p><p>The starting point for any framed set of Web pages is the <code><frame></code> tag, which usually uses the <code>src</code> attribute to point to a particular HTML document.</p> </pre> <pre class="has"><code><frame src="mainpage.html"></code></pre> <p>The <code><frame></code> tag defines the content of a single framed page. The example above assumes that you want to have a file called mainpage.html displayed within the frame. The only required attribute for the <code><frame></code> tag is the src attribute, which obviously tells the browser what file to display inside the frame. So far so good. </p> <p> <code><frame></code>标记定义单个框架页面的内容。 上面的示例假设您要在框架中显示一个名为mainpage.html的文件。 <code><frame></code>标记唯一需要的属性是src属性,该属性显然告诉浏览器在框架内显示什么文件。 到目前为止,一切都很好。 </p> <p>You can also control the appearance of scrollbars inside the frame with the scrolling attribute:</p> <p> 您还可以使用scrolling属性控制框架内滚动条的外观: </p> <pre class="has"><code><frame src="mainpage.html" scrolling="yes"></code></pre> <p>The default value for this attribute is auto, which lets the browser decide whether or not scrollbars are to be displayed. The other two values are yes and no, which are pretty self-explanatory.</p> <p> 此属性的默认值为auto,它使浏览器可以决定是否显示滚动条。 其他两个值是“是”和“否”,这很容易解释。 </p> <p>There is no closing <code></frame></code> tag.</p> <p> 没有结束<code></frame></code>标记。 </p> <p>You should not include any <code><head></code> tag information in the mainpage.html file, since the file represents a larger document. Everything on this page should be included within the <code><body></code> tags.</p> <p> 您不应在mainpage.html文件中包含任何<code><head></code>标记信息,因为该文件表示较大的文档。 此页面上的所有内容都应包含在<code><body></code>标记内。 </p> <p>Now you need to construct your frameset page. This page, usually called index.html for obvious reasons, contains the header information for the entire site as well as the <code><frameset></code> tags that construct the skeletal design for the site. Here’s a basic example, leaving out such necessities as <code>DOCTYPE</code>s and <code><meta></code> tags:</p> <p> 现在,您需要构建框架集页面。 出于明显的原因,该页面通常称为index.html,包含整个网站的标题信息以及构成该网站的骨架设计的<code><frameset></code>标记。 这是一个基本示例,省略了诸如<code>DOCTYPE</code>和<code><meta></code>标签之类的必需品: </p> <pre class="has"><code><html><br> <head>   <br> <title>Frames Document</title>   <br> </head>   <br> <frameset rows="50%,50%">   <br> ***add framed pages here using the <frame> tags***   <br> </frameset>   <br> </html></code></pre> <p>Note that there aren’t any <code><body></code> tags in this document. The <code><frameset></code> tags take their place (placing <code>BODY</code> code before the <code><frameset></code> tag causes the frameset to be ignored). The <code><frameset></code> tags have one necessary attribute, <code>ROWS</code> or <code>COL</code>(umn)<code>S</code>. The example above uses percentages to divide the available display space into two equal, horizontal areas. The <code>COLS</code> attribute will do the same thing, but divide the available space into two equal, vertical areas:</p> <p> 请注意,此文档中没有任何<code><body></code>标签。 <code><frameset></code>标签取代它们的位置(在<code><frameset></code>标签之前放置<code>BODY</code>代码会导致忽略框架集)。 <code><frameset></code>标签具有一个必要的属性,即<code>ROWS</code>或<code>COL</code> (umn) <code>S</code> 。 上面的示例使用百分比将可用显示空间划分为两个相等的水平区域。 <code>COLS</code>属性将执行相同的操作,但是将可用空间划分为两个相等的垂直区域: </p> <pre class="has"><code><frameset cols="50%,50%"></code></pre> <p>A lot of Web designers like to divide their pages into three vertical columns, with the two outside frames being narrower than the center column, which will contain the main body of information (this layout emulates the traditional three-column style of site design). If you want to do this, try something like:</p> <p> 许多Web设计师喜欢将页面分为三个垂直列,两个外部框架比中心列窄,其中包含信息的主体(此布局模仿传统的三列样式的网站设计)。 如果要执行此操作,请尝试以下操作: </p> <pre class="has"><code><frameset cols="100,*,100"></code></pre> <p>where the left- and right-hand columns are 100 pixels wide, and the larger center takes up the rest of the display space. As always, I recommend sticking with percentage widths (or heights) whenever possible, as people use a variety of display sizes. Note that the asterisk in the center of the above code simply means something like "the rest of the display." If you wrote it like so:</p> <p> 左右两列的宽度为100像素,较大的中心占据了其余显示空间。 与往常一样,由于人们使用各种显示尺寸,因此我建议尽可能使用宽度(或高度)百分比。 请注意,以上代码中心的星号仅表示“显示的其余部分”。 如果您这样写: </p> <pre class="has"><code><frameset cols="100,500,100"></code></pre> <p>you would have a set page width of 700 pixels, which would leave a lot of display real estate unused for our friends with bigger displays. You can also organize your display in relative terms, which specifies the size of the frames relative to other frames. This example shows two columns, where the one on the right is twice the width of that on the left:</p> <p> 您将页面宽度设置为700像素,这会给我们的较大显示屏的朋友留下很多可用的显示空间。 您还可以按照相对的术语来组织显示,该相对的术语指定框架相对于其他框架的尺寸。 本示例显示了两列,其中右边的一倍是左边的两倍: </p> <pre class="has"><code><frameset cols=*,2*"></code></pre> <p>The <code>*</code> is simply a placeholder. The above code tells the display, "cut the display into two columns, and make the right side twice the size of the left."</p> <p> <code>*</code>只是一个占位符。 上面的代码告诉显示屏,“将显示屏分成两列,并使右侧的大小是左侧的两倍”。 </p> <p>If the <code>ROWS</code> attribute is not set, the columns extend to the entire length of the page. If the COLS attribute is not set, the rows extend to the entire width of the page. If neither attribute is set, the frame takes up the exact area of the browser display — and what’s the use of that? (Maybe there is a use for a frameset with no COLS or ROWS attributes, but I can’t think of one offhand. If you can, post it in the forums.)</p> <p> 如果未设置<code>ROWS</code>属性,则列将扩展到页面的整个长度。 如果未设置COLS属性,则行将扩展到页面的整个宽度。 如果两个属性都未设置,则该框架将占据浏览器显示的确切区域,这有什么用? (也许可以使用没有COLS或ROWS属性的框架集,但我想不到一个有用的框架集。如果可以,请将其发布在论坛中。) </p> <p>You can mix absolute, relative, and percentage measurements, but check them carefully to see how they display. In fact, you should carefully check all your column and row measurements to see how they display, and don’t forget to check the layout in different display sizes and different browsers. Here are three examples of mixing measurements, cribbed from the W3C page on HTML frames:</p> <p> 您可以混合使用绝对,相对和百分比测量值,但要仔细检查它们的显示方式。 实际上,您应该仔细检查所有列和行的度量以查看其显示方式,并且不要忘记检查不同显示尺寸和不同浏览器的布局。 这是在HTML框架的W3C页面上抄写的三个混合测量示例: </p> <pre class="has"><code><frameset cols="1*,250,3*><br> ***yadayada***   <br> </frameset></code></pre> <p>This example creates three columns: the center space fixed at 250 pixels, useful for a chunk of content with a known size such as a graphic or a Flash window, and two columns on either side; the left-hand column receives 25% of the remaining space and the right-hand column gets the other 75% of the remaining space.</p> <p> 本示例创建三列:固定为250像素的中心空间,用于已知大小的图形或Flash窗口等大块内容,两边各两列; 左列获得剩余空间的25%,右列获得剩余空间的75%。 </p> <pre class="has"><code><frameset rows="30%,70%" cols="33%,34%,33%><br> ***yadayada***   <br> </frameset></code></pre> <p>This example gives you a 2-by-3 grid of subspaces.</p> <p> 本示例为您提供2×3的子空间网格。 </p> <pre class="has"><code><frameset rows="30%,400,*,2*"><br> ***yadayada***   <br> </frameset></code></pre> <p>Here, you have a browser display divided horizontally in four separate areas. The first gets 30% of the display space. The second gets 400 pixels exactly. The other two split up the remaining turf between them, with the fourth area getting twice the amount of the third. If your display is exactly 1000 pixels high, unlikely as that is, the first row will get 300 pixels, the second 400, the third 100, and the fourth 200.</p> <p> 在这里,您有一个浏览器显示,水平分成四个区域。 第一个获得30%的显示空间。 秒精确地获得400像素。 其他两个将剩余的草皮分开,第四个区域的面积是第三个区域的两倍。 如果您的显示器正好是1000像素高(不太可能),那么第一行将获得300像素,第二行将获得300像素,第三行将获得100像素,第四行将获得200像素。 </p> <p>Now let’s put together a sample frameset page, using the example codes from above and a few more:</p> <p> 现在,使用上面的示例代码以及其他一些示例,来组合一个示例框架集页面: </p> <pre class="has"><code><html><br> <head>   <br> <title>Frames Document</title>   <br> </head>   <br> <frameset cols="100,*,100">   <br>   <frame src="leftside.html">   <br>   <frame src="mainpage.html">   <br>   <frame src="rightside.html">   <br> </frameset>   <br> </html></code></pre> <p>This gives you the three-column display, with the two side columns restrained to 100 pixels each, and the center column used for the main content. Remember that in each column, if your content exceeds the available width, you get horizontal scrollbars. Nobody likes horizontal scrollbars. Again, play with the column widths so that you can avoid scrollbars as much as possible. Using rows in your framesets gives you vertical scrollbars, which are more acceptable.</p> <p> 这将为您提供三列显示,两个侧面列分别限制为100像素,中间列用作主要内容。 请记住,在每一列中,如果内容超出可用宽度,则会出现水平滚动条。 没有人喜欢水平滚动条。 同样,请使用列宽,以便尽可能避免滚动条。 在框架集中使用行会为您提供垂直滚动条,这更容易接受。 </p> <p>Remember, frames can be resized by simply moving the cursor over the border, waiting until it changes to a double arrow, and dragging the frame border to where you want it. Text will adapt itself to the change; graphics and other rigidly-sized content will not, and scrollbars will appear. Don’t want to let your visitors change your frames around? Use the noresize attribute (it has no values).</p> <p> 请记住,可以通过简单地将光标移到边框上,等待它变为双箭头,然后将边框拖动到所需位置来调整边框的大小。 文字将适应变化。 图形和其他固定大小的内容将不会显示,并且会出现滚动条。 不想让您的访客改变您的框架吗? 使用noresize属性(它没有值)。 </p> <pre class="has"><code><noframes></code></pre> <p>Always include a section with the <code><noframes></code> tag for people without frames-compliant browsers (there are still a few out there). People with such browsers will only see the content displayed within the tags; the rest of us won’t see it at all, as our frames-compliant browsers won’t show it:</p> <p> 对于没有符合框架要求的浏览器的人,请始终在其中包含带有<code><noframes></code>标记的部分(那里仍然有一些)。 使用这种浏览器的人只会看到标签中显示的内容; 我们其余的人根本看不到它,因为符合框架的浏览器不会显示它: </p> <pre class="has"><code><noframes>Your browser won't handle frames.  <a href="noframes.html">Go here for a better view!</a>

Of course, this noframes.html file should include all the content contained in the frameset, in a design that uses – you guessed it — no frames. Two sites in one… hmmm, here’s an argument for designing without frames…

当然,在使用“您猜对了-没有框架”的设计中,此noframes.html文件应包括框架集中包含的所有内容。 两个站点合为一体……嗯,这是无框架设计的一个论点……

Place the </code> code just above the closing <code></frameset></code> tag.</p> <p> 将<code><noframes></code>代码放在结束<code></frameset></code>标记上方。 </p> <p>Screen readers and audio browsers have a tremendous amount of difficulty with framed pages. This is reason alone to use a <code><noframes></code> page, even if everyone who visits your page is using the latest in browser technology. Some screen readers can handle simple framesets, so this caveat is slowly becoming irrelevant, but there are plenty of folks out there using older screen readers that can’t handle frames at all. Maximum accessibility is a necessity, not an option to be considered casually.</p> <p> 屏幕阅读器和音频浏览器对带框架的页面有很大的难度。 即使每个访问您页面的人都在使用最新的浏览器技术,也仅凭这个理由就可以使用<code><noframes></code>页面。 一些屏幕阅读器可以处理简单的框架集,因此这种警告逐渐变得无关紧要,但是很多人使用的老式屏幕阅读器根本无法处理框架。 最大的可访问性是必要的,不是随便考虑的选择。 </p> <h5> 棘手的东西 <span style="font-weight: bold;">(</span>Trickier Stuff<span style="font-weight: bold;">)</span></h5> <p>You can "nest" one frameset inside another for more complex layouts. Start off with something simple:</p> <p> 您可以将一个框架集“嵌套”在另一个框架集内以获得更复杂的布局。 从简单的事情开始: </p> <pre class="has"><code><frameset cols=*,2*><br>   <frame src="navigation.html">    <br>   <frame src="mainpage.html">    <br> </frameset></code></pre> <p>Here we’ve got two columns, the right one twice as big as the left. By the names of the files, you can deduce that we’re going to use the left side for navigation and the right, larger column for content. Now, let’s get tricky with it:</p> <p> 在这里,我们有两列,右列是左列的两倍。 根据文件名,您可以推断出我们将在导航中使用左侧,在内容中使用较大的右侧列。 现在,让我们棘手: </p> <pre class="has"><code><frameset rows="20%,*"><br>   <frame src="title.html">    <br>      <frameset cols="*,2*>    <br>         <frame src="navigation.html">    <br>         <frame src="mainpage.html">    <br>      <frameset>    <br> </frameset></code></pre> <p>This allows us to combine rows and cols together to create the classic "newspaper" site design: a horizontal "masthead" used as our title, and two columns, a narrow left-hand column for navigation and a wider right-side column for main content display. Note that the second <code><frameset></code>, the one with the columns, is completely contained within the second row of the first <code><frameset></code>.</p> <p> 这使我们可以将行和列组合在一起,以创建经典的“报纸”网站设计:以水平“标头”作为标题,以及两列,用于导航的左侧窄栏和用于主栏的较宽右侧栏内容显示。 请注意,第二个<code><frameset></code> (带有列)完全包含在第一个<code><frameset></code>的第二行中。 </p> <p>Want a two-column display with the larger, right-hand column divided into two rows? Just switch the rows and cols attributes above:</p> <p> 想要一个两列的显示器,将较大的右侧列分为两行? 只需切换上面的rows和cols属性即可: </p> <pre class="has"><code><frameset cols="20%,*"><br>   <frame src="title.html">    <br>      <frameset rows="*,2*>    <br>         <frame src="navigation.html">    <br>         <frame src="mainpage.html">    <br>      </frameset>    <br> </frameset></code></pre> <p>If the left-hand column isn’t wide enough, just change the value of 20% to 30% — or whatever suits you.</p> <p> 如果左侧栏不够宽,只需将20%的值更改为30%-或任何适合您的值即可。 </p> <p><strong><em>Margins</em></strong></p> <p> <strong><em>保证金</em></strong> </p> <p>HTML 4 provides two margin control commands, marginheight and marginwidth. The first specifies, in pixels, how much space is to be left between the frame’s contents in its top and bottom margins. The second does the same for the left and right margins. There is no specific default.</p> <p> HTML 4提供了两个边距控制命令,marginheight和marginwidth。 第一个以像素为单位指定在帧内容的顶部和底部空白处要保留多少空间。 第二个对左右边距执行相同的操作。 没有特定的默认值。 </p> <p><strong><em>Borderless Frames</em></strong></p> <p> <strong><em>无边框框架</em></strong> </p> <p>You can add certain attributes to your <code><frameset></code> tag to eliminate the frame borders, which display by default. Different versions of Netscape and Internet Explorer use different commands, so you may need all of the attributes below for proper site design, though the following code isn’t quite standard HTML 4:</p> <p> 您可以将某些属性添加到<code><frameset></code>标记中,以消除默认显示的边框。 不同版本的Netscape和Internet Explorer使用不同的命令,因此,尽管以下代码不是完全标准HTML 4,但您可能需要以下所有属性才能进行正确的站点设计: </p> <pre class="has"><code><frameset cols="*,*" framespacing="0" frameborder="0" border="0"></code></pre> <p>Both Netscape and IE use the <code>border</code> attribute, but it isn’t valid HTML 4. Its value should represent the border’s width in pixels.</p> <p> Netscape和IE都使用<code>border</code>属性,但它不是有效HTML4。其值应表示边框的宽度(以像素为单位)。 </p> <pre class="has"><code>framespacing</code></pre> <pre class="has"><code>frameborder</code> works with both Netscape and IE. Before HTML 4, the tag used different values for the two browsers: Netscape's values were <code>yes</code> and <code>no</code>. IE's were <code>1</code> and <code>0</code>, which correspond to the yes and no of Netscape. The defaults are <code>yes</code> and <code>1</code>, which tells the border to draw the border. HTML 4 standardized the tag to use 1 and 0. <p>If you're coding in HTML 4, use the <code><... frameborder="0"></code> tag if you want to keep your frames borderless.</p> <p><strong><em>Colored Borders</em></strong></p> </pre> <pre class="has"><code>bordercolor</code></pre> <pre class="has"><code><frameset cols="*,*" bordercolor="#F0F0F0"></code></pre> <p>Like the previous tags, bordercolor isn’t official HTML 4, though it works with both Netscape and IE.</p> <p> 像以前的标签一样,bordercolor不是官方HTML 4,尽管它可以与Netscape和IE一起使用。 </p> <p><strong><em>Margin Width and Margin Height</em></strong></p> <p> <strong><em>边距宽度和边距高度</em></strong> </p> <p>Not too many people bother to specify these attributes, which also go inside the <code><frameset></code> tag. The tags determine the margin’s height and width in pixels. Try the tags to see if they work for you.</p> <p> 没有太多的人愿意指定这些属性,这些属性也位于<code><frameset></code>标记内。 标签确定边距的高度和宽度(以像素为单位)。 尝试使用标签,看看它们是否对您有用。 </p> <p><strong><em>Interactive Frames</em></strong></p> <p> <strong><em>互动框架</em></strong> </p> <p>It’s a good idea for framed pages to be able to interact with each other; that is, direct hyperlinks to the framed pages. You’ll need to use the name and target attributes to do this.</p> <p> 框架页面之间可以进行交互是一个好主意。 也就是说,将超链接直接指向框架页面。 您需要使用名称和目标属性来执行此操作。 </p> <p>Start out by naming your framed content pages:</p> <p> 首先命名框架内容页面: </p> <pre class="has"><code><frameset cols=*,2*><br>   <frame src="navigation.html" name="frame1">     <br>   <frame src="mainpage.html" name="frame2">     <br> </frameset></code></pre> <p>Once you’ve named them, you can use the target attribute to direct hyperlinks to them:</p> <p> 命名它们后,可以使用target属性将超链接指向它们: </p> <pre class="has"><code><a href="moreinfo.html" target="frame2">More content</a></code></pre> <p>If you place this hyperlink into the navigation.html page, when the user clicks on it, the mainpage.html file will be replaced by the moreinfo.html file on the right side.</p> <p> 如果将此超链接放置在navigation.html页面中,则当用户单击它时,mainpage.html文件将由右侧的moreinfo.html文件替换。 </p> <p>If you give a target that hasn’t been defined with the name attribution, the page will open in a new browser window.</p> <p> 如果您提供的目标名称尚未定义,则该页面将在新的浏览器窗口中打开。 </p> <p>But what if we want twenty different pages to cycle through the main content display? We could just write twenty different links in navigation.html all targeted to "frame2", or we could use a <code><base></code> tag in the <code><head></code> section of the navigation.html page:</p> <p> 但是,如果我们希望在主要内容显示中循环显示二十个不同的页面怎么办? 我们可以只在navigation.html中编写二十个不同的链接,都以“ frame2”为目标,或者可以在navigation.html页面的<code><head></code>部分中使用<code><base></code>标记: </p> <pre class="has"><code><base target="frame2"></code></pre> <p>This emulates having the <code>target="frame2"</code> attribute in every hyperlink.</p> <p> 这模拟在每个超链接中具有<code>target="frame2"</code>属性。 </p> <p><strong><em>Special Target Commands</em></strong></p> <p> <strong><em>特殊目标命令</em></strong> </p> <p>There are four special target commands, and they all begin with the wonderful, magical, mystical underscore: <code>_</code>. Here they are:</p> <p> 有四个特殊的目标命令,它们都以奇妙的,神奇的,神秘的下划线开头: <code>_</code> 。 他们来了: </p> <ul> <li><p><code>target="_blank"</code> – causes the URL to load into a new browser window. </p><p> <code>target="_blank"</code> –使URL加载到新的浏览器窗口中。 </p></li> <li><p><code>target="_top"</code> – targets the URL to the entire browser window and wipes out all of the previous frames; used mostly when you’re linking from your own framed content to an outside site. </p><p> <code>target="_top"</code> –将URL定位到整个浏览器窗口,并擦除所有先前的框架; 从您自己的框架内容链接到外部网站时,通常使用该词。 </p></li> <li><p><code>target="_self"</code> – loads the URL into the same window (the default; if you want this to occur, there’s no need to specify it in the code). </p><p> <code>target="_self"</code> –将URL加载到同一窗口中(默认设置;如果您希望此操作发生,则无需在代码中指定它)。 </p></li> <li><p><code>target="_parent"</code> – loads the URL into the frameset’s parent window; unless you’re using nested framesets, this command works just like the <code>_top</code> command. If you’re using nested framesets, then this command loads the URL into the frame that is the "next step up" — the parent window. </p><p> <code>target="_parent"</code> –将URL加载到框架集的父窗口中; 除非使用嵌套框架集,否则此命令的工作方式与<code>_top</code>命令相同。 如果您使用的是嵌套框架集,那么此命令会将URL加载到“下一步”(父窗口)的框架中。 </p></li> </ul> <h5> 其他一些命令 <span style="font-weight: bold;">(</span>Some Other Commands<span style="font-weight: bold;">)</span></h5> <pre class="has"><code>marginheight</code> and <code>marginwidth</code> define the amount of space, in pixels, that falls between the margins and the content. <p>The <code>name</code> attribute is used to target the frame.</p> <p>The <code>scrolling</code> attribute decides the condition of the scrollbars, when applicable. The values are <code>on</code>, <code>off</code>, and <code>auto</code>, the default. Unless you have a specific need to turn scrollbars on or off, this attribute is best left out of your code, and the display will choose whether or not scrollbars are needed. Note that the <code>scrolling="no"</code> and <code>noresize</code> commands can make it tough on users with smaller displays if the two are used in conjunction. If you use them together, test-drive your site in a 640x480 display to see how it looks.</p> <p>The <code>title</code> attribute can contain a phrase that is used as the title of the iframe. Some browsers depict this information when the mouse hovers over the element, while others display the information in the right-click menu. If you want to include a longer description (usually for non-visual browsers), use the <code>longdesc</code> tag. It will provide a link to the longer description.</p> <h5>Advanced Features</h5> <p><strong><em>IFrames</em></strong></p> <p>IFrames, originally an Internet Explorer-only feature, are now viewable in Internet Explorer 2.x and above, Netscape 7, Mozilla, Opera 3 and 6, and even the WebTV/MSN browser. IFrames are included in the HTML 4.0 specifications as well as the XHTML 1.0 specs. IFrames are "inline" or "independent frames" that reside in the body of a regular HTML page, and can be nested in a page just like a graphic, and do not require the use of a frameset. They're easy to use and quite useful for sidebar and other information of interest that isn't directly relevant to the main body of content. The more you use them, the more uses you will find for them. When you're building your page and you reach the area where you want the iframe to be, simply use the following code (modified to your own uses, naturally):</p> </pre> <pre class="has"><code><iframe src="sidecontent.html" width="200" height="100" align="right">Inside this tag is content contained within an iframe.  Your browser may not display this material.  You can click <a href="sidecontent.html">here</a> to see it for yourself, and use the BACK button to return to the main page.</iframe></code></pre> <p>This gives you a little independently framed HTML page within the body of your main Web page, filled with whatever content you like. Non-compatible browsers will see the content within the two <code><iframe></code> tags. Although the width and height attributes are considered optional, they are usually employed; you can choose pixels (as in the above example) or percentages for your sizing choices.</p> <p> 这使您在主网页的正文中有一个独立框架HTML页面,其中填充了您喜欢的任何内容。 不兼容的浏览器将在两个<code><iframe></code>标签内看到内容。 尽管width和height属性被认为是可选的,但通常使用它们。 您可以为尺寸选择选择像素(如上例所示)或百分比。 </p> <p>Note that the <code>align</code> attribute has been deprecated in favor of style sheets. If you choose to use it, your main choices are:</p> <p> 请注意,不建议使用<code>align</code>属性,而应使用样式表。 如果选择使用它,则主要选择是: </p> <ul> <li><p><code>bottom</code>: the default; the bottom of the object is aligned with the baseline </p><p> <code>bottom</code> :默认值; 对象的底部与基线对齐 </p></li> <li><p><code>left</code>: the object is aligned along the left margin, with following objects arrayed to the right </p><p> <code>left</code> :对象沿左边界对齐,随后的对象排列在右侧 </p></li> <li><p><code>middle</code>: center of the object aligned with the baseline </p><p> <code>middle</code> :对象的中心与基线对齐 </p></li> <li><p><code>right</code>: the object is aligned along the right margin, with following objects arrayed to the left </p><p> <code>right</code> :对象沿右边距对齐,后面的对象排列在左边 </p></li> <li><p><code>top</code>: the top of the object aligned with the baseline </p><p> <code>top</code> :与基线对齐的对象的顶部 </p></li> </ul> <p>You can also use the <code>frameborder</code> and <code>scrolling</code> commands in an iframe.</p> <p> 您还可以在iframe中使用<code>frameborder</code>和<code>scrolling</code>命令。 </p> <p>CSS users can use the <code>class</code> and/or id attributes to define the contents of the tag according to the style class or the style ID. CSS users can also use absolute positioning, a floating <code>div</code> tag, and stylesheet declarations to have an iframe element "float" on top of your main content. Check out Webmonkey’s tutorial on how to accomplish this nifty little feat.</p> <p> CSS用户可以使用<code>class</code>和/或id属性根据样式类或样式ID定义标签的内容。 CSS用户还可以使用绝对定位,浮动<code>div</code>标签和样式表声明在主要内容的顶部添加iframe元素“ float”。 查看Webmonkey的教程 ,了解如何实现这一精巧的小壮举。 </p> <p><strong><em>Layers</em></strong></p> <p> <strong><em>层数</em></strong> </p> <p>Layers are somewhat similar to IFrames in concept, though not in execution or even appearance. They are strictly Netscape-only elements, and have never been included in official HTML specifications. Since they aren’t supported by newer versions of Netscape/Mozilla, not part of the official HTML specs, and are fading into irrelevance, I won’t go into details about their care and feeding here.</p> <p> 层在概念上与IFrames有点相似,尽管在执行甚至外观上都没有。 它们严格是仅Netscape元素,并且从未包含在官方HTML规范中。 由于较新版本的Netscape / Mozilla不支持它们,也不属于正式HTML规范,并且正逐渐变得无关紧要,因此在这里我不会详细介绍它们的护理和喂养。 </p> <p><strong><em>Search Engine Placement</em></strong></p> <p> <strong><em>搜索引擎的位置</em></strong> </p> <p>Frames cause big problems for search engines. Most search engines, including Google, have problems reading frameset pages. Some of them automatically hunt for "noframes" versions, and if they’re not available, the search engine will often settle for indexing just the "master," or frameset, page. Like older browsers, many search engines ignore the instructions on producing the frame. Only information within the noframes tags is read — information that a frames-capable browser will ignore. Hence the "this site uses frames but your browser doesn’t support them" message that you often see in search engine results. You probably don’t want the frameset page emphasized on the search engine; worse, you run the risk of having the engine display incomplete or misleading information about your site instead of the carefully crafted positioning message you intended to be shown on the engine listing.</p> <p> 框架给搜索引擎带来了大问题。 包括Google在内的大多数搜索引擎在阅读框架集页面时都会遇到问题。 其中一些会自动搜寻“ noframes”版本,如果它们不可用,搜索引擎通常会只索引“主”页面或框架集页面。 与旧版浏览器一样,许多搜索引擎都忽略了生成框架的说明。 仅读取noframes标记内的信息,即具有框架功能的浏览器将忽略的信息。 因此,您经常在搜索引擎结果中看到“此网站使用框架,但您的浏览器不支持它们”的消息。 您可能不希望在搜索引擎上强调框架集页面。 更糟糕的是,您冒着使引擎显示不完整或有关您的站点的信息误导的风险,而不是打算在引擎列表中显示的精心设计的定位消息。 </p> <p>So how do you work around this? <code><meta></code> tags included in the frameset page are one solution, but not a very good one, as most major search engines have all but abandoned support for <code><meta></code> tags. Still, they’re worth adding for the engines and intranets that do still use them. </p> <p> 那么您如何解决呢? 框架集页面中包含的<code><meta></code>标签是一种解决方案,但不是一个很好的解决方案,因为大多数主流搜索引擎几乎都放弃了对<code><meta></code>标签的支持。 仍然值得为仍使用它们的引擎和Intranet添加它们。 </p> <p>Note that there’s a strong argument that <code><meta></code> tags are no longer worth the time it takes to write them; I won’t debate that here, but if you want to read more about the issue, check out Search Engine Watch’s article, Death of a Meta Tag. The only major search engine to still use <code><meta></code> tags is Inktomi, and according to their director of product marketing, they’ve never given the tags a great deal of weight.</p> <p> 请注意,有一个很强的论点,即<code><meta></code>标记不再值得花费时间来编写它们。 在这里,我不会对此进行辩论,但是,如果您想了解更多有关此问题的信息,请查看Search Engine Watch的文章Meta标签的死亡 。 唯一仍使用<code><meta></code>标签的主要搜索引擎是Inktomi,据他们的产品营销总监称,他们从未给标签赋予过多的权重。 </p> <p>A better way to skin this particular cat is to include useful information in the <code><noframes></code> instructions. Put the <code><noframes></code> information immediately after the first <code><frameset></code> tag, if you want the text to be placed as high as possible on the page. Note that placing the information above the first frameset tag will disable the frame information in some versions of Netscape.</p> <p> 更好地为这只特定猫咪蒙皮的方法是在<code><noframes></code>指令中包含有用的信息。 如果要在页面上尽可能高的位置放置文本,请在第一个<code><frameset></code>标记之后立即放置<code><noframes></code>信息。 请注意,在第一个框架集标签上方放置信息会在某些版本的Netscape中禁用框架信息。 </p> <p>Don’t forget to use <code><body></code> tags on the frameset page, within the <code><noframes></code> tags. Providing your frameset page a title is helpful, even though it won’t appear when the page is viewed properly. Search engines do index titles; they are one of the most important elements your pages can have.</p> <p> 不要忘记在<code><noframes></code>标记内的框架集页面上使用<code><body></code> <code><noframes></code>标记。 为框架集页面提供标题会有所帮助,即使在正确查看页面时标题也不会出现。 搜索引擎做索引标题; 它们是页面可以拥有的最重要的元素之一。 </p> <p>Now that you’ve gotten this far, you’ve created a page that search engines can see and index properly. Great… so far. What you haven’t done yet is give search engine users a page that is within your frameset; they have a page outside the normal frame constraints. This can be particularly troublesome with engines like AltaVista that are "frames-capable." These engines can link to any page within your framed site, and display it by itself, without the benefit of the frameset. </p> <p> 到目前为止,您已经创建了一个页面,搜索引擎可以看到该页面并对其进行正确索引。 很好...到目前为止。 您尚未完成的工作就是为搜索引擎用户提供一个位于框架集中的页面; 他们的页面超出了正常的框架限制。 对于像AltaVista这样具有“框架功能”的引擎,这尤其麻烦。 这些引擎可以链接到框架站点中的任何页面,并且可以单独显示它,而无需使用框架集。 </p> <p>You can easily strand visitors coming straight to a page inside your site if and when it doesn’t display inside the frameset you designed. Fortunately, there’s a simple answer to this. Just be sure to include a "Home" link at the top or bottom of every page that leads back to the main, frameset page. Make sure you use the <code>target="_top"</code> attribute, like so:</p> <p> 如果在您设计的框架集中没有显示访问者的页面时,您可以轻松地将访问者直接吸引到该页面。 幸运的是,有一个简单的答案。 只要确保在每个页面的顶部或底部都包含一个“主页”链接,该链接就可以返回到主框架集页面。 确保使用<code>target="_top"</code>属性,如下所示: </p> <pre class="has"><code><a href="index.html" target="_top">Home Page</a></code></pre> <p>Without this attribute, visitors who click on your "Home" link will see a new set of frames drawn within the main frame; not pretty, and not very user-friendly.</p> <p> 没有此属性,单击“主页”链接的访问者将看到在主框架中绘制的一组新框架; 不漂亮,也不是很友好。 </p> <p>Another solution uses JavaScript to force the frames to be redrawn, but I’ll leave that as an exercise for the student to locate and use. There are many different varieties of JavaScript coding that accomplishes this particular task. Often, pages that use JavaScript to deal with frame redrawing also prevent visitors from being able to use the "Back" button in its normal fashion to get back to where they came from. Users have to click twice, very quickly, on the "Back" button before the preceding page gets a chance to throw them back into the frameset, or use the back button’s history menu to get out of the frameset.</p> <p> 另一种解决方案使用JavaScript强制重新绘制框架,但我将其留作练习,让学生定位和使用。 有很多不同JavaScript编码可以完成此特定任务。 通常,使用JavaScript处理框架重绘的页面还会阻止访问者以常规方式使用“返回”按钮返回到其来源。 用户必须非常快地在上一页上单击“后退”按钮两次,才有机会将其扔回到框架集中,或者使用后退按钮的历史记录菜单退出框架。 </p> <h5> 最后提示 <span style="font-weight: bold;">(</span>Final Tips<span style="font-weight: bold;">)</span></h5> <p>Always include alternative navigational links for your framed HTML pages for those who don’t have frames-capable browsers.</p> <p> 对于不支持框架浏览器的用户,请始终为框架HTML页面包括备用导航链接。 </p> <p>Always, always, always add the <code>target="_blank"</code> attribute to links to outside Web pages from within your framed pages. Otherwise, your frame may envelop the outside site within its frameset. That effect (sometimes deliberately inflicted upon poor innocent surfers by evil-minded Web designers, most often employed by commercial sites that want to keep their ad-heavy frameset in front of your face at all times) angers both Web surfers and site owners who don’t want your frameset "hijacking" their content. There may even be legal repercussions to trapping other sites in your frames.</p> <p> 总是,总是,总是将<code>target="_blank"</code>属性添加到框架页面中到外部Web网页的链接。 否则,您的框架可能会将外部站点包裹在其框架集中。 这种影响(有时是出于邪恶的Web设计师故意使可怜的无辜冲浪者所为,这些邪恶的Web设计师通常是经常希望将广告沉重的框架保持在您面前的商业网站所雇用),这激怒了Web冲浪者和那些不想让您的框架“劫持”他们的内容。 甚至可能会有法律上的影响,将其他网站困在您的框架中。 </p> <p>Keep other folks’ frames from engulfing your pages by including this <code><meta></code> tag in the <code><head></code> section of every page:</p> <p> 通过在每个页面的<code><head></code>部分中包含以下<code><meta></code>标记,可以防止他人的框架吞噬您的页面: </p> <pre class="has"><code><meta http-equiv="Window-target" content="top" /></code></pre> <p>Bookmarking a framed HTML page is easy enough — just right-click inside the frame, choose "Add to Favorites" or "Add Bookmark," and that framed page is bookmarked. Of course, most modern versions of Netscape and Internet Explorer can bookmark framed pages without the fuss of right-clicking.</p> <p> 为带有框架HTML页面添加书签非常容易,只需在框架内右键单击,选择“添加到收藏夹”或“添加书签”,然后将该带有框架的页面添加为书签。 当然,大多数现代版本的Netscape和Internet Explorer都可以为带框架的页面添加书签,而无需单击鼠标右键。 </p> <p>You can share data between several frames using the <code><object></code> tag. This is a little more sophisticated than the rest of the material I’ve covered, so I’ll leave it to you to find out more about how to use this command. Start with the W3C specifications.</p> <p> 您可以使用<code><object></code>标签在多个帧之间共享数据。 这比我介绍的其余材料要复杂得多,因此我将把它留给您以了解有关如何使用此命令的更多信息。 从W3C规范开始。 </p> <p>A suggestion relating to the <code><object></code> tag above: using JavaScript or CGI scripts to help manage your framed sites dramatically increases your ability to keep everything together in a reasonable amount of time, and gives your visitors more control over their navigation and usage of your site. As I’m neither a JavaScript nor Perl codemaster, I’ll let you learn about that on your own! You can start this investigation, too, with the W3C specifications above, and continue with SitePoint’s own excellent Designing with Frames tutorial from the inimitable Kevin Yank.</p> <p> 与上述<code><object></code>标记有关的建议:使用JavaScript或CGI脚本来帮助管理框架站点,可以显着提高您在合理的时间内将所有内容保持在一起的能力,并使访问者可以更好地控制其导航和使用情况现场。 由于我既不是JavaScript也不是Perl代码管理员,因此我将让您自己学习! 您也可以使用上面的W3C规范来开始此调查,并继续使用无与伦比的Kevin Yank撰写的SitePoint自己出色的Designing with Frames教程。 </p> <p>Want to learn how to make an index page that works for both IE and Netscape, as well as for browsers that don’t support the effect? About.com has a nice little tutorial on how to use a JavaScript snippet to achieve this goal. </p> <p> 是否想学习如何使索引页面适用于IE和Netscape以及不支持该效果的浏览器? About.com上有一个不错的小教程,介绍如何使用JavaScript代码段实现此目标。 </p> <p>Have fun framing, and as always, feel free to comment in the Forums. Who knows, you may actually find a use for frames in your site that you hadn’t considered before!</p> <p> 玩得开心,并且一如既往地在论坛中发表评论。 谁知道,您实际上可能会在您以前从未考虑过的网站中找到框架的用途! </p> <h5> 参考书目 <span style="font-weight: bold;">(</span>Bibliography<span style="font-weight: bold;">)</span></h5> <p>Choosing a DOCTYPEhttp://www.htmlhelp.com/tools/validator/doctype.html</p> <p> 选择DOCTYPE http://www.htmlhelp.com/tools/validator/doctype.html </p> <p>Death of a Meta Taghttp://searchenginewatch.com/sereport/article.php/2165061</p> <p> 元标记的死亡http://searchenginewatch.com/sereport/article.php/2165061 </p> <p>Designing with Frames – An Introductionhttps://www.sitepoint.com/article/622</p> <p> 框架设计–简介https://www.sitepoint.com/article/622 </p> <p>Doug’s Frames Tutorialhttp://users.snowcrest.net/dougbnt/frametut.html</p> <p> 道格框架教程http://users.snowcrest.net/dougbnt/frametut.html </p> <p>Frames Are a Picnichttp://hotwired.lycos.com/webmonkey/96/31/index3a.html</p> <p> 相框是野餐http://hotwired.lycos.com/webmonkey/96/31/index3a.html </p> <p>Frames in HTML Documentshttps://www.w3.org/TR/REC-html40/present/frames.html</p> <p> HTML文档中的框架https://www.w3.org/TR/REC-html40/present/frames.html </p> <p>Frames Without Tearshttp://www.alistapart.com/stories/frames/frames4.html</p> <p> 没有眼泪的框架http://www.alistapart.com/stories/frames/frames4.html </p> <p>Frames – Why and Why Nothttp://webdesign.about.com/library/weekly/aa111097.htm</p> <p> 框架–为什么和为什么不http://webdesign.about.com/library/weekly/aa111097.htm </p> <p>Framing the Webhttp://webreference.com/dev/frames/i</p> <p> 构架网站http://webreference.com/dev/frames/i </p> <p>The Furor Over Frameshttp://webclipart.about.com/library/weekly/aa062797.htm</p> <p> 框架狂怒http://webclipart.about.com/library/weekly/aa062797.htm </p> <p>The History of HTMLhttp://hotwired.lycos.com/webmonkey/97/17/index0a.html?tw=authoring</p> <p> HTML的历史http://hotwired.lycos.com/webmonkey/97/17/index0a.html?tw=authoring </p> <p>How to Use HTML Meta Tagshttp://www.searchenginewatch.com/webmasters/article.php/2167931</p> <p> 如何使用HTML元标记http://www.searchenginewatch.com/webmasters/article.php/2167931 </p> <p>The <IFRAME></IFRAME> Element – Inline Frameshttp://webdesign.about.com/library/tags/bltags-iframe.htm</p> <p> <IFRAME> </ IFRAME>元素-内联框架http://webdesign.about.com/library/tags/bltags-iframe.htm </p> <p>IFrameshttp://webdesign.about.com/cs/frameshelp/a/aaiframe.htm</p> <p> IFrames http://webdesign.about.com/cs/frameshelp/a/aaiframe.htm </p> <p>The IFrames Lowdownhttp://hotwired.lycos.com/webmonkey/96/37/index2a.html</p> <p> IFrames Lowdown http://hotwired.lycos.com/webmonkey/96/37/index2a.html </p> <p>The Ins and Outs of Frameshttp://www.ddj.com/documents/s=2361/nam1011135274/index.html</p> <p> 框架的来龙去脉http://www.ddj.com/documents/s=2361/nam1011135274/index.html </p> <p>Introduction to Frameshttp://www.jalfrezi.com/frames.htm</p> <p> 框架简介http://www.jalfrezi.com/frames.htm </p> <p>Lynx Users Guide version 2.8.3http://lynx.isc.org/release/lynx2-8-3/lynx_help/Lynx_users_guide.html</p> <p> Lynx用户指南2.8.3版http://lynx.isc.org/release/lynx2-8-3/lynx_help/Lynx_users_guide.html </p> <p>Search Engines and Frameshttp://www.searchenginewatch.com/webmasters/article.php/2167901</p> <p> 搜索引擎和框架http://www.searchenginewatch.com/webmasters/article.php/2167901 </p> <p>Some Caveats with Using Frameshttp://www.evolt.org/article/rating/22/293/index.html</p> <p> 使用框架的一些注意事项http://www.evolt.org/article/rating/22/293/index.html </p> <p>To Frame or Not to Frame?https://www.sitepoint.com/article/122</p> <p> 构图还是不构图? https://www.sitepoint.com/article/122 </p> <p>Top Ten Mistakes Revisited Three Years Laterhttp://useit.com/alertbox/990502.html</p> <p> 三年后重新审视的十大错误http://useit.com/alertbox/990502.html </p> <p>Web Developer Foundations: Chapter 5: XHTML Frameshttp://webdevfoundations.net/chapter5/l</p> <p> Web开发人员基础:第5章:XHTML框架http://webdevfoundations.net/chapter5/l </p> <p>Web Frames for Everyonehttp://webdesign.about.com/library/weekly/aa110199.htm</p> <p> 每个人的网络框架http://webdesign.about.com/library/weekly/aa110199.htm </p> <p>Web Site Administriviahttp://www.ehsco.com/opinion/19980209.html</p> <p> 网站管理http://www.ehsco.com/opinion/19980209.html </p> <p>Why Frames Suck (Most of the Time)http://www.useit.com/alertbox/9612.html</p> <p> 为什么陷害(大多数时间) http://www.useit.com/alertbox/9612.html </p> <p>Writing HTML Frames for Audio Browsershttp://webdesign.about.com/cs/frameshelp/a/aaaccessframes.htm</p> <p> 为音频浏览器编写HTML框架http://webdesign.about.com/cs/frameshelp/a/aaaccessframes.htm </p> <blockquote> <p>翻译自: https://www.sitepoint.com/frames-frame-usage-explained/</p> </blockquote> <p>网页框架布局设计</p> </div> </div> </div> </div> </div> <!--PC和WAP自适应版--> <div id="SOHUCS" sid="1641541840979156992"></div> <script type="text/javascript" src="/views/front/js/chanyan.js"></script> <!-- 文章页-底部 动态广告位 --> <div class="youdao-fixed-ad" id="detail_ad_bottom"></div> </div> <div class="col-md-3"> <div class="row" id="ad"> <!-- 文章页-右侧1 动态广告位 --> <div id="right-1" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad"> <div class="youdao-fixed-ad" id="detail_ad_1"> </div> </div> <!-- 文章页-右侧2 动态广告位 --> <div id="right-2" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad"> <div class="youdao-fixed-ad" id="detail_ad_2"></div> </div> <!-- 文章页-右侧3 动态广告位 --> <div id="right-3" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad"> <div class="youdao-fixed-ad" id="detail_ad_3"></div> </div> </div> </div> </div> </div> </div> <div class="container"> <h4 class="pt20 mb15 mt0 border-top">你可能感兴趣的:(搜索引擎,java,html5,python,css)</h4> <div id="paradigm-article-related"> <div class="recommend-post mb30"> <ul class="widget-links"> <li><a href="/article/1835511912843014144.htm" title="理解Gunicorn:Python WSGI服务器的基石" target="_blank">理解Gunicorn:Python WSGI服务器的基石</a> <span class="text-muted">范范0825</span> <a class="tag" taget="_blank" href="/search/ipython/1.htm">ipython</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a> <div>理解Gunicorn:PythonWSGI服务器的基石介绍Gunicorn,全称GreenUnicorn,是一个为PythonWSGI(WebServerGatewayInterface)应用设计的高效、轻量级HTTP服务器。作为PythonWeb应用部署的常用工具,Gunicorn以其高性能和易用性著称。本文将介绍Gunicorn的基本概念、安装和配置,帮助初学者快速上手。1.什么是Gunico</div> </li> <li><a href="/article/1835509897106649088.htm" title="Long类型前后端数据不一致" target="_blank">Long类型前后端数据不一致</a> <span class="text-muted">igotyback</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a> <div>响应给前端的数据浏览器控制台中response中看到的Long类型的数据是正常的到前端数据不一致前后端数据类型不匹配是一个常见问题,尤其是当后端使用Java的Long类型(64位)与前端JavaScript的Number类型(最大安全整数为2^53-1,即16位)进行数据交互时,很容易出现精度丢失的问题。这是因为JavaScript中的Number类型无法安全地表示超过16位的整数。为了解决这个问</div> </li> <li><a href="/article/1835509769822105600.htm" title="LocalDateTime 转 String" target="_blank">LocalDateTime 转 String</a> <span class="text-muted">igotyback</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a> <div>importjava.time.LocalDateTime;importjava.time.format.DateTimeFormatter;publicclassMain{publicstaticvoidmain(String[]args){//获取当前时间LocalDateTimenow=LocalDateTime.now();//定义日期格式化器DateTimeFormatterformat</div> </li> <li><a href="/article/1835509391361667072.htm" title="Linux下QT开发的动态库界面弹出操作(SDL2)" target="_blank">Linux下QT开发的动态库界面弹出操作(SDL2)</a> <span class="text-muted">13jjyao</span> <a class="tag" taget="_blank" href="/search/QT%E7%B1%BB/1.htm">QT类</a><a class="tag" taget="_blank" href="/search/qt/1.htm">qt</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/sdl2/1.htm">sdl2</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a> <div>需求:操作系统为linux,开发框架为qt,做成需带界面的qt动态库,调用方为java等非qt程序难点:调用方为java等非qt程序,也就是说调用方肯定不带QApplication::exec(),缺少了这个,QTimer等事件和QT创建的窗口将不能弹出(包括opencv也是不能弹出);这与qt调用本身qt库是有本质的区别的思路:1.调用方缺QApplication::exec(),那么我们在接口</div> </li> <li><a href="/article/1835506869838376960.htm" title="Python数据分析与可视化实战指南" target="_blank">Python数据分析与可视化实战指南</a> <span class="text-muted">William数据分析</span> <a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE/1.htm">数据</a> <div>在数据驱动的时代,Python因其简洁的语法、强大的库生态系统以及活跃的社区,成为了数据分析与可视化的首选语言。本文将通过一个详细的案例,带领大家学习如何使用Python进行数据分析,并通过可视化来直观呈现分析结果。一、环境准备1.1安装必要库在开始数据分析和可视化之前,我们需要安装一些常用的库。主要包括pandas、numpy、matplotlib和seaborn等。这些库分别用于数据处理、数学</div> </li> <li><a href="/article/1835505858939809792.htm" title="python os.environ" target="_blank">python os.environ</a> <span class="text-muted">江湖偌大</span> <a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0/1.htm">深度学习</a> <div>os.environ['TF_CPP_MIN_LOG_LEVEL']='0'#默认值,输出所有信息os.environ['TF_CPP_MIN_LOG_LEVEL']='1'#屏蔽通知信息(INFO)os.environ['TF_CPP_MIN_LOG_LEVEL']='2'#屏蔽通知信息和警告信息(INFO\WARNING)os.environ['TF_CPP_MIN_LOG_LEVEL']='</div> </li> <li><a href="/article/1835505606245576704.htm" title="Python中os.environ基本介绍及使用方法" target="_blank">Python中os.environ基本介绍及使用方法</a> <span class="text-muted">鹤冲天Pro</span> <a class="tag" taget="_blank" href="/search/%23/1.htm">#</a><a class="tag" taget="_blank" href="/search/Python/1.htm">Python</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a> <div>文章目录python中os.environos.environ简介os.environ进行环境变量的增删改查python中os.environ的使用详解1.简介2.key字段详解2.1常见key字段3.os.environ.get()用法4.环境变量的增删改查和判断是否存在4.1新增环境变量4.2更新环境变量4.3获取环境变量4.4删除环境变量4.5判断环境变量是否存在python中os.envi</div> </li> <li><a href="/article/1835505226933694464.htm" title="Pyecharts数据可视化大屏:打造沉浸式数据分析体验" target="_blank">Pyecharts数据可视化大屏:打造沉浸式数据分析体验</a> <span class="text-muted">我的运维人生</span> <a class="tag" taget="_blank" href="/search/%E4%BF%A1%E6%81%AF%E5%8F%AF%E8%A7%86%E5%8C%96/1.htm">信息可视化</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90/1.htm">数据分析</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98/1.htm">数据挖掘</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4%E5%BC%80%E5%8F%91/1.htm">运维开发</a><a class="tag" taget="_blank" href="/search/%E6%8A%80%E6%9C%AF%E5%85%B1%E4%BA%AB/1.htm">技术共享</a> <div>Pyecharts数据可视化大屏:打造沉浸式数据分析体验在当今这个数据驱动的时代,如何将海量数据以直观、生动的方式展现出来,成为了数据分析师和企业决策者关注的焦点。Pyecharts,作为一款基于Python的开源数据可视化库,凭借其丰富的图表类型、灵活的配置选项以及高度的定制化能力,成为了构建数据可视化大屏的理想选择。本文将深入探讨如何利用Pyecharts打造数据可视化大屏,并通过实际代码案例</div> </li> <li><a href="/article/1835504217729626112.htm" title="Python教程:一文了解使用Python处理XPath" target="_blank">Python教程:一文了解使用Python处理XPath</a> <span class="text-muted">旦莫</span> <a class="tag" taget="_blank" href="/search/Python%E8%BF%9B%E9%98%B6/1.htm">Python进阶</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a> <div>目录1.环境准备1.1安装lxml1.2验证安装2.XPath基础2.1什么是XPath?2.2XPath语法2.3示例XML文档3.使用lxml解析XML3.1解析XML文档3.2查看解析结果4.XPath查询4.1基本路径查询4.2使用属性查询4.3查询多个节点5.XPath的高级用法5.1使用逻辑运算符5.2使用函数6.实战案例6.1从网页抓取数据6.1.1安装Requests库6.1.2代</div> </li> <li><a href="/article/1835503965563875328.htm" title="python os.environ_python os.environ 读取和设置环境变量" target="_blank">python os.environ_python os.environ 读取和设置环境变量</a> <span class="text-muted">weixin_39605414</span> <a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/os.environ/1.htm">os.environ</a> <div>>>>importos>>>os.environ.keys()['LC_NUMERIC','GOPATH','GOROOT','GOBIN','LESSOPEN','SSH_CLIENT','LOGNAME','USER','HOME','LC_PAPER','PATH','DISPLAY','LANG','TERM','SHELL','J2REDIR','LC_MONETARY','QT_QPA</div> </li> <li><a href="/article/1835498925755297792.htm" title="DIV+CSS+JavaScript技术制作网页(旅游主题网页设计与制作)云南大理" target="_blank">DIV+CSS+JavaScript技术制作网页(旅游主题网页设计与制作)云南大理</a> <span class="text-muted">STU学生网页设计</span> <a class="tag" taget="_blank" href="/search/%E7%BD%91%E9%A1%B5%E8%AE%BE%E8%AE%A1/1.htm">网页设计</a><a class="tag" taget="_blank" href="/search/%E6%9C%9F%E6%9C%AB%E7%BD%91%E9%A1%B5%E4%BD%9C%E4%B8%9A/1.htm">期末网页作业</a><a class="tag" taget="_blank" href="/search/html%E9%9D%99%E6%80%81%E7%BD%91%E9%A1%B5/1.htm">html静态网页</a><a class="tag" taget="_blank" href="/search/html5%E6%9C%9F%E6%9C%AB%E5%A4%A7%E4%BD%9C%E4%B8%9A/1.htm">html5期末大作业</a><a class="tag" taget="_blank" href="/search/%E7%BD%91%E9%A1%B5%E8%AE%BE%E8%AE%A1/1.htm">网页设计</a><a class="tag" taget="_blank" href="/search/web%E5%A4%A7%E4%BD%9C%E4%B8%9A/1.htm">web大作业</a> <div>️精彩专栏推荐作者主页:【进入主页—获取更多源码】web前端期末大作业:【HTML5网页期末作业(1000套)】程序员有趣的告白方式:【HTML七夕情人节表白网页制作(110套)】文章目录二、网站介绍三、网站效果▶️1.视频演示2.图片演示四、网站代码HTML结构代码CSS样式代码五、更多源码二、网站介绍网站布局方面:计划采用目前主流的、能兼容各大主流浏览器、显示效果稳定的浮动网页布局结构。网站程</div> </li> <li><a href="/article/1835498547785592832.htm" title="【华为OD机试真题2023B卷 JAVA&JS】We Are A Team" target="_blank">【华为OD机试真题2023B卷 JAVA&JS】We Are A Team</a> <span class="text-muted">若博豆</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/%E5%8D%8E%E4%B8%BA/1.htm">华为</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a> <div>华为OD2023(B卷)机试题库全覆盖,刷题指南点这里WeAreATeam时间限制:1秒|内存限制:32768K|语言限制:不限题目描述:总共有n个人在机房,每个人有一个标号(1&lt;=标号&lt;=n),他们分成了多个团队,需要你根据收到的m条消息判定指定的两个人是否在一个团队中,具体的:1、消息构成为:abc,整数a、b分别代</div> </li> <li><a href="/article/1835497664922349568.htm" title="使用Faiss进行高效相似度搜索" target="_blank">使用Faiss进行高效相似度搜索</a> <span class="text-muted">llzwxh888</span> <a class="tag" taget="_blank" href="/search/faiss/1.htm">faiss</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a> <div>在现代AI应用中,快速和高效的相似度搜索是至关重要的。Faiss(FacebookAISimilaritySearch)是一个专门用于快速相似度搜索和聚类的库,特别适用于高维向量。本文将介绍如何使用Faiss来进行相似度搜索,并结合Python代码演示其基本用法。什么是Faiss?Faiss是一个由FacebookAIResearch团队开发的开源库,主要用于高维向量的相似性搜索和聚类。Faiss</div> </li> <li><a href="/article/1835497665853485056.htm" title="python是什么意思中文-在python中%是什么意思" target="_blank">python是什么意思中文-在python中%是什么意思</a> <span class="text-muted">编程大乐趣</span> <div>Python中%有两种:1、数值运算:%代表取模,返回除法的余数。如:>>>7%212、%操作符(字符串格式化,stringformatting),说明如下:%[(name)][flags][width].[precision]typecode(name)为命名flags可以有+,-,''或0。+表示右对齐。-表示左对齐。''为一个空格,表示在正数的左侧填充一个空格,从而与负数对齐。0表示使用0填</div> </li> <li><a href="/article/1835496149843275776.htm" title="关于城市旅游的HTML网页设计——(旅游风景云南 5页)HTML+CSS+JavaScript" target="_blank">关于城市旅游的HTML网页设计——(旅游风景云南 5页)HTML+CSS+JavaScript</a> <span class="text-muted">二挡起步</span> <a class="tag" taget="_blank" href="/search/web%E5%89%8D%E7%AB%AF%E6%9C%9F%E6%9C%AB%E5%A4%A7%E4%BD%9C%E4%B8%9A/1.htm">web前端期末大作业</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a><a class="tag" taget="_blank" href="/search/%E6%97%85%E6%B8%B8/1.htm">旅游</a><a class="tag" taget="_blank" href="/search/%E9%A3%8E%E6%99%AF/1.htm">风景</a> <div>⛵源码获取文末联系✈Web前端开发技术描述网页设计题材,DIV+CSS布局制作,HTML+CSS网页设计期末课程大作业|游景点介绍|旅游风景区|家乡介绍|等网站的设计与制作|HTML期末大学生网页设计作业,Web大学生网页HTML:结构CSS:样式在操作方面上运用了html5和css3,采用了div+css结构、表单、超链接、浮动、绝对定位、相对定位、字体样式、引用视频等基础知识JavaScrip</div> </li> <li><a href="/article/1835496148601761792.htm" title="HTML网页设计制作大作业(div+css) 云南我的家乡旅游景点 带文字滚动" target="_blank">HTML网页设计制作大作业(div+css) 云南我的家乡旅游景点 带文字滚动</a> <span class="text-muted">二挡起步</span> <a class="tag" taget="_blank" href="/search/web%E5%89%8D%E7%AB%AF%E6%9C%9F%E6%9C%AB%E5%A4%A7%E4%BD%9C%E4%B8%9A/1.htm">web前端期末大作业</a><a class="tag" taget="_blank" href="/search/web%E8%AE%BE%E8%AE%A1%E7%BD%91%E9%A1%B5%E8%A7%84%E5%88%92%E4%B8%8E%E8%AE%BE%E8%AE%A1/1.htm">web设计网页规划与设计</a><a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/dreamweaver/1.htm">dreamweaver</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a> <div>Web前端开发技术描述网页设计题材,DIV+CSS布局制作,HTML+CSS网页设计期末课程大作业游景点介绍|旅游风景区|家乡介绍|等网站的设计与制作HTML期末大学生网页设计作业HTML:结构CSS:样式在操作方面上运用了html5和css3,采用了div+css结构、表单、超链接、浮动、绝对定位、相对定位、字体样式、引用视频等基础知识JavaScript:做与用户的交互行为文章目录前端学习路线</div> </li> <li><a href="/article/1835495644123459584.htm" title="Day1笔记-Python简介&标识符和关键字&输入输出" target="_blank">Day1笔记-Python简介&标识符和关键字&输入输出</a> <span class="text-muted">~在杰难逃~</span> <a class="tag" taget="_blank" href="/search/Python/1.htm">Python</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%95%B0%E6%8D%AE/1.htm">大数据</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90/1.htm">数据分析</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98/1.htm">数据挖掘</a> <div>大家好,从今天开始呢,杰哥开展一个新的专栏,当然,数据分析部分也会不定时更新的,这个新的专栏主要是讲解一些Python的基础语法和知识,帮助0基础的小伙伴入门和学习Python,感兴趣的小伙伴可以开始认真学习啦!一、Python简介【了解】1.计算机工作原理编程语言就是用来定义计算机程序的形式语言。我们通过编程语言来编写程序代码,再通过语言处理程序执行向计算机发送指令,让计算机完成对应的工作,编程</div> </li> <li><a href="/article/1835495517774245888.htm" title="python八股文面试题分享及解析(1)" target="_blank">python八股文面试题分享及解析(1)</a> <span class="text-muted">Shawn________</span> <a class="tag" taget="_blank" href="/search/python/1.htm">python</a> <div>#1.'''a=1b=2不用中间变量交换a和b'''#1.a=1b=2a,b=b,aprint(a)print(b)结果:21#2.ll=[]foriinrange(3):ll.append({'num':i})print(11)结果:#[{'num':0},{'num':1},{'num':2}]#3.kk=[]a={'num':0}foriinrange(3):#0,12#可变类型,不仅仅改变</div> </li> <li><a href="/article/1835493753557708800.htm" title="每日算法&面试题,大厂特训二十八天——第二十天(树)" target="_blank">每日算法&面试题,大厂特训二十八天——第二十天(树)</a> <span class="text-muted">肥学</span> <a class="tag" taget="_blank" href="/search/%E2%9A%A1%E7%AE%97%E6%B3%95%E9%A2%98%E2%9A%A1%E9%9D%A2%E8%AF%95%E9%A2%98%E6%AF%8F%E6%97%A5%E7%B2%BE%E8%BF%9B/1.htm">⚡算法题⚡面试题每日精进</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/1.htm">数据结构</a> <div>目录标题导读算法特训二十八天面试题点击直接资料领取导读肥友们为了更好的去帮助新同学适应算法和面试题,最近我们开始进行专项突击一步一步来。上一期我们完成了动态规划二十一天现在我们进行下一项对各类算法进行二十八天的一个小总结。还在等什么快来一起肥学进行二十八天挑战吧!!特别介绍小白练手专栏,适合刚入手的新人欢迎订阅编程小白进阶python有趣练手项目里面包括了像《机器人尬聊》《恶搞程序》这样的有趣文章</div> </li> <li><a href="/article/1835493626688401408.htm" title="Python快速入门 —— 第三节:类与对象" target="_blank">Python快速入门 —— 第三节:类与对象</a> <span class="text-muted">孤华暗香</span> <a class="tag" taget="_blank" href="/search/Python%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8/1.htm">Python快速入门</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a> <div>第三节:类与对象目标:了解面向对象编程的基础概念,并学会如何定义类和创建对象。内容:类与对象:定义类:class关键字。类的构造函数:__init__()。类的属性和方法。对象的创建与使用。示例:classStudent:def__init__(self,name,age,major):self.name&#</div> </li> <li><a href="/article/1835493267907637248.htm" title="webpack图片等资源的处理" target="_blank">webpack图片等资源的处理</a> <span class="text-muted">dmengmeng</span> <div>需要的loaderfile-loader(让我们可以引入这些资源文件)url-loader(其实是file-loader的二次封装)img-loader(处理图片所需要的)在没有使用任何处理图片的loader之前,比如说css中用到了背景图片,那么最后打包会报错的,因为他没办法处理图片。其实你只想能够使用图片的话。只加一个file-loader就可以,打开网页能准确看到图片。{test:/\.(p</div> </li> <li><a href="/article/1835492869062881280.htm" title="pyecharts——绘制柱形图折线图" target="_blank">pyecharts——绘制柱形图折线图</a> <span class="text-muted">2224070247</span> <a class="tag" taget="_blank" href="/search/%E4%BF%A1%E6%81%AF%E5%8F%AF%E8%A7%86%E5%8C%96/1.htm">信息可视化</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%8F%AF%E8%A7%86%E5%8C%96/1.htm">数据可视化</a> <div>一、pyecharts概述自2013年6月百度EFE(ExcellentFrontEnd)数据可视化团队研发的ECharts1.0发布到GitHub网站以来,ECharts一直备受业界权威的关注并获得广泛好评,成为目前成熟且流行的数据可视化图表工具,被应用到诸多数据可视化的开发领域。Python作为数据分析领域最受欢迎的语言,也加入ECharts的使用行列,并研发出方便Python开发者使用的数据</div> </li> <li><a href="/article/1835492740536823808.htm" title="node.js学习" target="_blank">node.js学习</a> <span class="text-muted">小猿L</span> <a class="tag" taget="_blank" href="/search/node.js/1.htm">node.js</a><a class="tag" taget="_blank" href="/search/node.js/1.htm">node.js</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0/1.htm">学习</a><a class="tag" taget="_blank" href="/search/vim/1.htm">vim</a> <div>node.js学习实操及笔记温故node.js,node.js学习实操过程及笔记~node.js学习视频node.js官网node.js中文网实操笔记githubcsdn笔记为什么学node.js可以让别人访问我们编写的网页为后续的框架学习打下基础,三大框架vuereactangular离不开node.jsnode.js是什么官网:node.js是一个开源的、跨平台的运行JavaScript的运行</div> </li> <li><a href="/article/1835491859351302144.htm" title="Python 实现图片裁剪(附代码) | Python工具" target="_blank">Python 实现图片裁剪(附代码) | Python工具</a> <span class="text-muted">剑客阿良_ALiang</span> <div>前言本文提供将图片按照自定义尺寸进行裁剪的工具方法,一如既往的实用主义。环境依赖ffmpeg环境安装,可以参考我的另一篇文章:windowsffmpeg安装部署_阿良的博客-CSDN博客本文主要使用到的不是ffmpeg,而是ffprobe也在上面这篇文章中的zip包中。ffmpy安装:pipinstallffmpy-ihttps://pypi.douban.com/simple代码不废话了,上代码</div> </li> <li><a href="/article/1835491353451130880.htm" title="【华为OD技术面试真题 - 技术面】- python八股文真题题库(4)" target="_blank">【华为OD技术面试真题 - 技术面】- python八股文真题题库(4)</a> <span class="text-muted">算法大师</span> <a class="tag" taget="_blank" href="/search/%E5%8D%8E%E4%B8%BAod/1.htm">华为od</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95/1.htm">面试</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a> <div>华为OD面试真题精选专栏:华为OD面试真题精选目录:2024华为OD面试手撕代码真题目录以及八股文真题目录文章目录华为OD面试真题精选**1.Python中的`with`**用途和功能自动资源管理示例:文件操作上下文管理协议示例代码工作流程解析优点2.\_\_new\_\_和**\_\_init\_\_**区别__new____init__区别总结3.**切片(Slicing)操作**基本切片语法</div> </li> <li><a href="/article/1835490974911000576.htm" title="python os 环境变量" target="_blank">python os 环境变量</a> <span class="text-muted">CV矿工</span> <a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/numpy/1.htm">numpy</a> <div>环境变量:环境变量是程序和操作系统之间的通信方式。有些字符不宜明文写进代码里,比如数据库密码,个人账户密码,如果写进自己本机的环境变量里,程序用的时候通过os.environ.get()取出来就行了。os.environ是一个环境变量的字典。环境变量的相关操作importos"""设置/修改环境变量:os.environ[‘环境变量名称’]=‘环境变量值’#其中key和value均为string类</div> </li> <li><a href="/article/1835490218845761536.htm" title="Python爬虫解析工具之xpath使用详解" target="_blank">Python爬虫解析工具之xpath使用详解</a> <span class="text-muted">eqa11</span> <a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E7%88%AC%E8%99%AB/1.htm">爬虫</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a> <div>文章目录Python爬虫解析工具之xpath使用详解一、引言二、环境准备1、插件安装2、依赖库安装三、xpath语法详解1、路径表达式2、通配符3、谓语4、常用函数四、xpath在Python代码中的使用1、文档树的创建2、使用xpath表达式3、获取元素内容和属性五、总结Python爬虫解析工具之xpath使用详解一、引言在Python爬虫开发中,数据提取是一个至关重要的环节。xpath作为一门</div> </li> <li><a href="/article/1835483915071090688.htm" title="【华为OD技术面试真题 - 技术面】- python八股文真题题库(1)" target="_blank">【华为OD技术面试真题 - 技术面】- python八股文真题题库(1)</a> <span class="text-muted">算法大师</span> <a class="tag" taget="_blank" href="/search/%E5%8D%8E%E4%B8%BAod/1.htm">华为od</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95/1.htm">面试</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a> <div>华为OD面试真题精选专栏:华为OD面试真题精选目录:2024华为OD面试手撕代码真题目录以及八股文真题目录文章目录华为OD面试真题精选1.数据预处理流程数据预处理的主要步骤工具和库2.介绍线性回归、逻辑回归模型线性回归(LinearRegression)模型形式:关键点:逻辑回归(LogisticRegression)模型形式:关键点:参数估计与评估:3.python浅拷贝及深拷贝浅拷贝(Shal</div> </li> <li><a href="/article/1835483159630802944.htm" title="nosql数据库技术与应用知识点" target="_blank">nosql数据库技术与应用知识点</a> <span class="text-muted">皆过客,揽星河</span> <a class="tag" taget="_blank" href="/search/NoSQL/1.htm">NoSQL</a><a class="tag" taget="_blank" href="/search/nosql/1.htm">nosql</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a><a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%95%B0%E6%8D%AE/1.htm">大数据</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90/1.htm">数据分析</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/1.htm">数据结构</a><a class="tag" taget="_blank" href="/search/%E9%9D%9E%E5%85%B3%E7%B3%BB%E5%9E%8B%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">非关系型数据库</a> <div>Nosql知识回顾大数据处理流程数据采集(flume、爬虫、传感器)数据存储(本门课程NoSQL所处的阶段)Hdfs、MongoDB、HBase等数据清洗(入仓)Hive等数据处理、分析(Spark、Flink等)数据可视化数据挖掘、机器学习应用(Python、SparkMLlib等)大数据时代存储的挑战(三高)高并发(同一时间很多人访问)高扩展(要求随时根据需求扩展存储)高效率(要求读写速度快)</div> </li> <li><a href="/article/1835481269690003456.htm" title="《Python数据分析实战终极指南》" target="_blank">《Python数据分析实战终极指南》</a> <span class="text-muted">xjt921122</span> <a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90/1.htm">数据分析</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a> <div>对于分析师来说,大家在学习Python数据分析的路上,多多少少都遇到过很多大坑**,有关于技能和思维的**:Excel已经没办法处理现有的数据量了,应该学Python吗?找了一大堆Python和Pandas的资料来学习,为什么自己动手就懵了?跟着比赛类公开数据分析案例练了很久,为什么当自己面对数据需求还是只会数据处理而没有分析思路?学了对比、细分、聚类分析,也会用PEST、波特五力这类分析法,为啥</div> </li> <li><a href="/article/127.htm" title="用MiddleGenIDE工具生成hibernate的POJO(根据数据表生成POJO类)" target="_blank">用MiddleGenIDE工具生成hibernate的POJO(根据数据表生成POJO类)</a> <span class="text-muted">AdyZhang</span> <a class="tag" taget="_blank" href="/search/POJO/1.htm">POJO</a><a class="tag" taget="_blank" href="/search/eclipse/1.htm">eclipse</a><a class="tag" taget="_blank" href="/search/Hibernate/1.htm">Hibernate</a><a class="tag" taget="_blank" href="/search/MiddleGenIDE/1.htm">MiddleGenIDE</a> <div>推荐:MiddlegenIDE插件,&nbsp;&nbsp; 是一个Eclipse&nbsp;&nbsp; 插件.&nbsp;&nbsp;&nbsp;&nbsp; 用它可以直接连接到数据库,&nbsp;&nbsp; 根据表按照一定的HIBERNATE规则作出BEAN和对应的XML ,用完后你可以手动删除它加载的JAR包和XML文件!&nbsp;&nbsp;&nbsp;&nbsp; 今天开始试着使用</div> </li> <li><a href="/article/254.htm" title=".9.png" target="_blank">.9.png</a> <span class="text-muted">Cb123456</span> <a class="tag" taget="_blank" href="/search/android/1.htm">android</a> <div>&nbsp;&nbsp;“点九”是andriod平台的应用软件开发里的一种特殊的图片形式,文件扩展名为:.9.png   智能手机中有自动横屏的功能,同一幅界面会在随着手机(或平板电脑)中的方向传感器的参数不同而改变显示的方向,在界面改变方向后,界面上的图形会因为长宽的变化而产生拉伸,造成图形的失真变形。   我们都知道android平台有多种不同的分辨率,很多控件的切图文件在被放大拉伸后,边</div> </li> <li><a href="/article/381.htm" title="算法的效率" target="_blank">算法的效率</a> <span class="text-muted">天子之骄</span> <a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95%E6%95%88%E7%8E%87/1.htm">算法效率</a><a class="tag" taget="_blank" href="/search/%E5%A4%8D%E6%9D%82%E5%BA%A6/1.htm">复杂度</a><a class="tag" taget="_blank" href="/search/%E6%9C%80%E5%9D%8F%E6%83%85%E5%86%B5%E8%BF%90%E8%A1%8C%E6%97%B6%E9%97%B4/1.htm">最坏情况运行时间</a><a class="tag" taget="_blank" href="/search/%E5%A4%A7O%E9%98%B6/1.htm">大O阶</a><a class="tag" taget="_blank" href="/search/%E5%B9%B3%E5%9D%87%E6%83%85%E5%86%B5%E8%BF%90%E8%A1%8C%E6%97%B6%E9%97%B4/1.htm">平均情况运行时间</a> <div>算法的效率 效率是速度和空间消耗的度量。集中考虑程序的速度,也称运行时间或执行时间,用复杂度的阶(O)这一标准来衡量。空间的消耗或需求也可以用大O表示,而且它总是小于或等于时间需求。 &nbsp; 以下是我的学习笔记: &nbsp; 1.求值与霍纳法则,即为秦九韶公式。 &nbsp; 2.测定运行时间的最可靠方法是计数对运行时间有贡献的基本操作的执行次数。运行时间与这个计数成正比。 </div> </li> <li><a href="/article/508.htm" title="java数据结构" target="_blank">java数据结构</a> <span class="text-muted">何必如此</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/1.htm">数据结构</a> <div>Java 数据结构 Java工具包提供了强大的数据结构。在Java中的数据结构主要包括以下几种接口和类: 枚举(Enumeration) 位集合(BitSet) 向量(Vector) 栈(Stack) 字典(Dictionary) 哈希表(Hashtable) 属性(Properties) 以上这些类是传统遗留的,在Java2中引入了一种新的框架-集合框架(Collect</div> </li> <li><a href="/article/635.htm" title="MybatisHelloWorld" target="_blank">MybatisHelloWorld</a> <span class="text-muted">3213213333332132</span> <div> //测试入口TestMyBatis package com.base.helloworld.test; import java.io.IOException; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSession; import org.apache.ibat</div> </li> <li><a href="/article/762.htm" title="Java|urlrewrite|URL重写|多个参数" target="_blank">Java|urlrewrite|URL重写|多个参数</a> <span class="text-muted">7454103</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/xml/1.htm">xml</a><a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a><a class="tag" taget="_blank" href="/search/%E5%B7%A5%E4%BD%9C/1.htm">工作</a> <div>&nbsp;个人工作经验! 如有不当之处,敬请指点 1.0 &nbsp;web -info 目录下建立&nbsp;&nbsp;&nbsp;&nbsp; urlrewrite.xml&nbsp; 文件 类似如下: &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt; &nbsp; &lt;!DOCTYPE u</div> </li> <li><a href="/article/889.htm" title="达梦数据库+ibatis" target="_blank">达梦数据库+ibatis</a> <span class="text-muted">darkranger</span> <a class="tag" taget="_blank" href="/search/sql/1.htm">sql</a><a class="tag" taget="_blank" href="/search/mysql/1.htm">mysql</a><a class="tag" taget="_blank" href="/search/ibatis/1.htm">ibatis</a><a class="tag" taget="_blank" href="/search/SQL+Server/1.htm">SQL Server</a> <div>--插入数据方面 如果您需要数据库自增... 那么在插入的时候不需要指定自增列. 如果想自己指定ID列的值, 那么要设置 set identity_insert&nbsp; 数据库名.模式名.表名; ----然后插入数据; example: create table zhabei.test( id bigint identity(1,1) primary key, nam</div> </li> <li><a href="/article/1016.htm" title="XML 解析 四种方式" target="_blank">XML 解析 四种方式</a> <span class="text-muted">aijuans</span> <a class="tag" taget="_blank" href="/search/android/1.htm">android</a> <div>XML现在已经成为一种通用的数据交换格式,平台的无关性使得很多场合都需要用到XML。本文将详细介绍用Java解析XML的四种方法。 XML现在已经成为一种通用的数据交换格式,它的平台无关性,语言无关性,系统无关性,给数据集成与交互带来了极大的方便。对于XML本身的语法知识与技术细节,需要阅读相关的技术文献,这里面包括的内容有DOM(Document Object </div> </li> <li><a href="/article/1143.htm" title="spring中配置文件占位符的使用" target="_blank">spring中配置文件占位符的使用</a> <span class="text-muted">avords</span> <div>1.类 &lt;?xml&nbsp;version=&quot;1.0&quot;&nbsp;encoding=&quot;UTF-8&quot;?&gt;&lt;!DOCTYPE&nbsp;beans&nbsp;PUBLIC&nbsp;&quot;-//SPRING//DTD&nbsp;BEAN//EN&quot;&nbsp;&quot;http://www.springframework.o</div> </li> <li><a href="/article/1270.htm" title="前端工程化-公共模块的依赖和常用的工作流" target="_blank">前端工程化-公共模块的依赖和常用的工作流</a> <span class="text-muted">bee1314</span> <a class="tag" taget="_blank" href="/search/webpack/1.htm">webpack</a> <div>题记: 一个人的项目,还有工程化的问题嘛? &nbsp; 我们在推进模块化和组件化的过程中,肯定会不断的沉淀出我们项目的模块和组件。对于这些沉淀出的模块和组件怎么管理?另外怎么依赖也是个问题? 你真的想这样嘛? &nbsp; var BreadCrumb = require(‘../../../../uikit/breadcrumb’); //真心ugly。 &nbsp; </div> </li> <li><a href="/article/1397.htm" title="上司说「看你每天准时下班就知道你工作量不饱和」,该如何回应?" target="_blank">上司说「看你每天准时下班就知道你工作量不饱和」,该如何回应?</a> <span class="text-muted">bijian1013</span> <a class="tag" taget="_blank" href="/search/%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86/1.htm">项目管理</a><a class="tag" taget="_blank" href="/search/%E6%B2%9F%E9%80%9A/1.htm">沟通</a><a class="tag" taget="_blank" href="/search/IT%E8%81%8C%E4%B8%9A%E8%A7%84%E5%88%92/1.htm">IT职业规划</a> <div>问题:上司说「看你每天准时下班就知道你工作量不饱和」,如何回应 &nbsp; &nbsp; &nbsp; &nbsp; 正常下班时间6点,只要是6点半前下班的,上司都认为没有加班。 &nbsp; Eno-Bea回答,注重感受,不一定是别人的 &nbsp; &nbsp; &nbsp; &nbsp; 虽然我不知道你具体从事什么工作与职业,但是我大概猜测,你是从事一项不太容易出现阶段性成果的工作</div> </li> <li><a href="/article/1524.htm" title="TortoiseSVN,过滤文件" target="_blank">TortoiseSVN,过滤文件</a> <span class="text-muted">征客丶</span> <a class="tag" taget="_blank" href="/search/SVN/1.htm">SVN</a> <div>环境: TortoiseSVN 1.8 配置: 在文件夹空白处右键 选择&nbsp; TortoiseSVN -&gt; Settings 在 Global ignote pattern 中添加要过滤的文件: 多类型用英文空格分开 *name : 过滤所有名称为 name 的文件或文件夹 *.name : 过滤所有后缀为 name 的文件或文件夹 --------</div> </li> <li><a href="/article/1651.htm" title="【Flume二】HDFS sink细说" target="_blank">【Flume二】HDFS sink细说</a> <span class="text-muted">bit1129</span> <a class="tag" taget="_blank" href="/search/Flume/1.htm">Flume</a> <div>1. Flume配置 &nbsp; a1.sources=r1 a1.channels=c1 a1.sinks=k1 ###Flume负责启动44444端口 a1.sources.r1.type=avro a1.sources.r1.bind=0.0.0.0 a1.sources.r1.port=44444 a1.sources.r1.chan</div> </li> <li><a href="/article/1778.htm" title="The Eight Myths of Erlang Performance" target="_blank">The Eight Myths of Erlang Performance</a> <span class="text-muted">bookjovi</span> <a class="tag" taget="_blank" href="/search/erlang/1.htm">erlang</a> <div>erlang有一篇guide很有意思:&nbsp;http://www.erlang.org/doc/efficiency_guide 里面有个The Eight Myths of Erlang Performance:&nbsp;http://www.erlang.org/doc/efficiency_guide/myths.html &nbsp; Myth: Funs are sl</div> </li> <li><a href="/article/1905.htm" title="java多线程网络传输文件(非同步)-2008-08-17" target="_blank">java多线程网络传输文件(非同步)-2008-08-17</a> <span class="text-muted">ljy325</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E5%A4%9A%E7%BA%BF%E7%A8%8B/1.htm">多线程</a><a class="tag" taget="_blank" href="/search/socket/1.htm">socket</a> <div>利用 Socket 套接字进行面向连接通信的编程。客户端读取本地文件并发送;服务器接收文件并保存到本地文件系统中。 使用说明:请将TransferClient, TransferServer, TempFile三个类编译,他们的类包是FileServer. 客户端: 修改TransferClient: serPort, serIP, filePath, blockNum,的值来符合您机器的系</div> </li> <li><a href="/article/2032.htm" title="读《研磨设计模式》-代码笔记-模板方法模式" target="_blank">读《研磨设计模式》-代码笔记-模板方法模式</a> <span class="text-muted">bylijinnan</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/1.htm">设计模式</a> <div>声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/ import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet;</div> </li> <li><a href="/article/2159.htm" title="配置心得" target="_blank">配置心得</a> <span class="text-muted">chenyu19891124</span> <a class="tag" taget="_blank" href="/search/%E9%85%8D%E7%BD%AE/1.htm">配置</a> <div>时间就这样不知不觉的走过了一个春夏秋冬,转眼间来公司已经一年了,感觉时间过的很快,时间老人总是这样不停走,从来没停歇过。 作为一名新手的配置管理员,刚开始真的是对配置管理是一点不懂,就只听说咱们公司配置主要是负责升级,而具体该怎么做却一点都不了解。经过老员工的一点点讲解,慢慢的对配置有了初步了解,对自己所在的岗位也慢慢的了解。 做了一年的配置管理给自总结下: 1.改变 从一个以前对配置毫无</div> </li> <li><a href="/article/2286.htm" title="对“带条件选择的并行汇聚路由问题”的再思考" target="_blank">对“带条件选择的并行汇聚路由问题”的再思考</a> <span class="text-muted">comsci</span> <a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/%E5%B7%A5%E4%BD%9C/1.htm">工作</a><a class="tag" taget="_blank" href="/search/%E8%BD%AF%E4%BB%B6%E6%B5%8B%E8%AF%95/1.htm">软件测试</a><a class="tag" taget="_blank" href="/search/%E5%B5%8C%E5%85%A5%E5%BC%8F/1.htm">嵌入式</a><a class="tag" taget="_blank" href="/search/%E9%A2%86%E5%9F%9F%E6%A8%A1%E5%9E%8B/1.htm">领域模型</a> <div>2008年上半年,我在设计并开发基于”JWFD流程系统“的商业化改进型引擎的时候,由于采用了新的嵌入式公式模块而导致出现“带条件选择的并行汇聚路由问题”(请参考2009-02-27博文),当时对这个问题的解决办法是采用基于拓扑结构的处理思想,对汇聚点的实际前驱分支节点通过算法预测出来,然后进行处理,简单的说就是找到造成这个汇聚模型的分支起点,对这个起始分支节点实际走的路径数进行计算,然后把这个实际</div> </li> <li><a href="/article/2413.htm" title="Oracle 10g 的clusterware 32位 下载地址" target="_blank">Oracle 10g 的clusterware 32位 下载地址</a> <span class="text-muted">daizj</span> <a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a> <div>Oracle 10g 的clusterware 32位 下载地址 http://pan.baidu.com/share/link?shareid=531580&amp;uk=421021908 http://pan.baidu.com/share/link?shareid=137223&amp;uk=321552738 http://pan.baidu.com/share/l</div> </li> <li><a href="/article/2540.htm" title="非常好的介绍:Linux定时执行工具cron" target="_blank">非常好的介绍:Linux定时执行工具cron</a> <span class="text-muted">dongwei_6688</span> <a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a> <div>Linux经过十多年的发展,很多用户都很了解Linux了,这里介绍一下Linux下cron的理解,和大家讨论讨论。cron是一个Linux 定时执行工具,可以在无需人工干预的情况下运行作业,本文档不讲cron实现原理,主要讲一下Linux定时执行工具cron的具体使用及简单介绍。 新增调度任务推荐使用crontab -e命令添加自定义的任务(编辑的是/var/spool/cron下对应用户的cr</div> </li> <li><a href="/article/2667.htm" title="Yii assets目录生成及修改" target="_blank">Yii assets目录生成及修改</a> <span class="text-muted">dcj3sjt126com</span> <a class="tag" taget="_blank" href="/search/yii/1.htm">yii</a> <div>assets的作用是方便模块化,插件化的,一般来说出于安全原因不允许通过url访问protected下面的文件,但是我们又希望将module单独出来,所以需要使用发布,即将一个目录下的文件复制一份到assets下面方便通过url访问。 assets设置对应的方法位置&nbsp;\framework\web\CAssetManager.php &nbsp; assets配置方法&nbsp;在m</div> </li> <li><a href="/article/2794.htm" title="mac工作软件推荐" target="_blank">mac工作软件推荐</a> <span class="text-muted">dcj3sjt126com</span> <a class="tag" taget="_blank" href="/search/mac/1.htm">mac</a> <div>mac上的Terminal + bash + screen组合现在已经非常好用了,但是还是经不起iterm+zsh+tmux的冲击。在同事的强烈推荐下,趁着升级mac系统的机会,顺便也切换到iterm+zsh+tmux的环境下了。 我为什么要要iterm2 切换过来也是脑袋一热的冲动,我也调查过一些资料,看了下iterm的一些优点: * 兼容性好,远程服务器 vi 什么的低版本能很好兼</div> </li> <li><a href="/article/2921.htm" title="Memcached(三)、封装Memcached和Ehcache" target="_blank">Memcached(三)、封装Memcached和Ehcache</a> <span class="text-muted">frank1234</span> <a class="tag" taget="_blank" href="/search/memcached/1.htm">memcached</a><a class="tag" taget="_blank" href="/search/ehcache/1.htm">ehcache</a><a class="tag" taget="_blank" href="/search/spring+ioc/1.htm">spring ioc</a> <div>本文对Ehcache和Memcached进行了简单的封装,这样对于客户端程序无需了解ehcache和memcached的差异,仅需要配置缓存的Provider类就可以在二者之间进行切换,Provider实现类通过Spring IoC注入。 cache.xml &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; </div> </li> <li><a href="/article/3048.htm" title="Remove Duplicates from Sorted List II" target="_blank">Remove Duplicates from Sorted List II</a> <span class="text-muted">hcx2013</span> <a class="tag" taget="_blank" href="/search/remove/1.htm">remove</a> <div>Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only&nbsp;distinct&nbsp;numbers from the original list. For example,Given&nbsp;1-&gt;2-&gt;3-&gt;3-&gt;4-&gt;4-&gt;5,</div> </li> <li><a href="/article/3175.htm" title="Spring4新特性——注解、脚本、任务、MVC等其他特性改进" target="_blank">Spring4新特性——注解、脚本、任务、MVC等其他特性改进</a> <span class="text-muted">jinnianshilongnian</span> <a class="tag" taget="_blank" href="/search/spring4/1.htm">spring4</a> <div>Spring4新特性——泛型限定式依赖注入 Spring4新特性——核心容器的其他改进 Spring4新特性——Web开发的增强 Spring4新特性——集成Bean Validation 1.1(JSR-349)到SpringMVC&nbsp; Spring4新特性——Groovy Bean定义DSL Spring4新特性——更好的Java泛型操作API&nbsp; Spring4新</div> </li> <li><a href="/article/3302.htm" title="MySQL安装文档" target="_blank">MySQL安装文档</a> <span class="text-muted">liyong0802</span> <a class="tag" taget="_blank" href="/search/mysql/1.htm">mysql</a> <div>&nbsp; 工作中用到的MySQL可能安装在两种操作系统中,即Windows系统和Linux系统。以Linux系统中情况居多。 &nbsp; 安装在Windows系统时与其它Windows应用程序相同按照安装向导一直下一步就即,这里就不具体介绍,本文档只介绍Linux系统下MySQL的安装步骤。 &nbsp; Linux系统下安装MySQL分为三种:RPM包安装、二进制包安装和源码包安装。二</div> </li> <li><a href="/article/3429.htm" title="使用VS2010构建HotSpot工程" target="_blank">使用VS2010构建HotSpot工程</a> <span class="text-muted">p2p2500</span> <a class="tag" taget="_blank" href="/search/HotSpot/1.htm">HotSpot</a><a class="tag" taget="_blank" href="/search/OpenJDK/1.htm">OpenJDK</a><a class="tag" taget="_blank" href="/search/VS2010/1.htm">VS2010</a> <div>1. 下载OpenJDK7的源码: &nbsp;&nbsp;&nbsp;&nbsp; http://download.java.net/openjdk/jdk7 &nbsp;&nbsp;&nbsp;&nbsp; http://download.java.net/openjdk/ &nbsp;&nbsp;&nbsp;&nbsp; 2. 环境配置 &nbsp;&nbsp;&nbsp; ▶</div> </li> <li><a href="/article/3556.htm" title="Oracle实用功能之分组后列合并" target="_blank">Oracle实用功能之分组后列合并</a> <span class="text-muted">seandeng888</span> <a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a><a class="tag" taget="_blank" href="/search/%E5%88%86%E7%BB%84/1.htm">分组</a><a class="tag" taget="_blank" href="/search/%E5%AE%9E%E7%94%A8%E5%8A%9F%E8%83%BD/1.htm">实用功能</a><a class="tag" taget="_blank" href="/search/%E5%90%88%E5%B9%B6/1.htm">合并</a> <div>1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 实例解析 由于业务需求需要对表中的数据进行分组后进行合并的处理,鉴于Oracle10g没有现成的函数实现该功能,且该功能如若用JAVA代码实现会比较复杂,因此,特将SQL语言的实现方式分享出来,希望对大家有所帮助。如下: 表test 数据如下: ID,SUBJECTCODE,DIMCODE,VALUE 1&nbs</div> </li> <li><a href="/article/3683.htm" title="Java定时任务注解方式实现" target="_blank">Java定时任务注解方式实现</a> <span class="text-muted">tuoni</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a><a class="tag" taget="_blank" href="/search/jvm/1.htm">jvm</a><a class="tag" taget="_blank" href="/search/xml/1.htm">xml</a><a class="tag" taget="_blank" href="/search/jni/1.htm">jni</a> <div>Spring 注解的定时任务,有如下两种方式: 第一种: &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot; &nbsp;xmlns:xsi=&quot;http</div> </li> <li><a href="/article/3810.htm" title="11大Java开源中文分词器的使用方法和分词效果对比" target="_blank">11大Java开源中文分词器的使用方法和分词效果对比</a> <span class="text-muted">yangshangchuan</span> <a class="tag" taget="_blank" href="/search/word%E5%88%86%E8%AF%8D%E5%99%A8/1.htm">word分词器</a><a class="tag" taget="_blank" href="/search/ansj%E5%88%86%E8%AF%8D%E5%99%A8/1.htm">ansj分词器</a><a class="tag" taget="_blank" href="/search/Stanford%E5%88%86%E8%AF%8D%E5%99%A8/1.htm">Stanford分词器</a><a class="tag" taget="_blank" href="/search/FudanNLP%E5%88%86%E8%AF%8D%E5%99%A8/1.htm">FudanNLP分词器</a><a class="tag" taget="_blank" href="/search/HanLP%E5%88%86%E8%AF%8D%E5%99%A8/1.htm">HanLP分词器</a> <div>本文的目标有两个: 1、学会使用11大Java开源中文分词器 2、对比分析11大Java开源中文分词器的分词效果 本文给出了11大Java开源中文分词的使用方法以及分词结果对比代码,至于效果哪个好,那要用的人结合自己的应用场景自己来判断。 11大Java开源中文分词器,不同的分词器有不同的用法,定义的接口也不一样,我们先定义一个统一的接口: /** * 获取文本的所有分词结果, 对比</div> </li> </ul> </div> </div> </div> <div> <div class="container"> <div class="indexes"> <strong>按字母分类:</strong> <a href="/tags/A/1.htm" target="_blank">A</a><a href="/tags/B/1.htm" target="_blank">B</a><a href="/tags/C/1.htm" target="_blank">C</a><a href="/tags/D/1.htm" target="_blank">D</a><a href="/tags/E/1.htm" target="_blank">E</a><a href="/tags/F/1.htm" target="_blank">F</a><a href="/tags/G/1.htm" target="_blank">G</a><a href="/tags/H/1.htm" target="_blank">H</a><a href="/tags/I/1.htm" target="_blank">I</a><a href="/tags/J/1.htm" target="_blank">J</a><a href="/tags/K/1.htm" target="_blank">K</a><a href="/tags/L/1.htm" target="_blank">L</a><a href="/tags/M/1.htm" target="_blank">M</a><a href="/tags/N/1.htm" target="_blank">N</a><a href="/tags/O/1.htm" target="_blank">O</a><a href="/tags/P/1.htm" target="_blank">P</a><a href="/tags/Q/1.htm" target="_blank">Q</a><a href="/tags/R/1.htm" target="_blank">R</a><a href="/tags/S/1.htm" target="_blank">S</a><a href="/tags/T/1.htm" target="_blank">T</a><a href="/tags/U/1.htm" target="_blank">U</a><a href="/tags/V/1.htm" target="_blank">V</a><a href="/tags/W/1.htm" target="_blank">W</a><a href="/tags/X/1.htm" target="_blank">X</a><a href="/tags/Y/1.htm" target="_blank">Y</a><a href="/tags/Z/1.htm" target="_blank">Z</a><a href="/tags/0/1.htm" target="_blank">其他</a> </div> </div> </div> <footer id="footer" class="mb30 mt30"> <div class="container"> <div class="footBglm"> <a target="_blank" href="/">首页</a> - <a target="_blank" href="/custom/about.htm">关于我们</a> - <a target="_blank" href="/search/Java/1.htm">站内搜索</a> - <a target="_blank" href="/sitemap.txt">Sitemap</a> - <a target="_blank" href="/custom/delete.htm">侵权投诉</a> </div> <div class="copyright">版权所有 IT知识库 CopyRight © 2000-2050 E-COM-NET.COM , All Rights Reserved. <!-- <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">京ICP备09083238号</a><br>--> </div> </div> </footer> <!-- 代码高亮 --> <script type="text/javascript" src="/static/syntaxhighlighter/scripts/shCore.js"></script> <script type="text/javascript" src="/static/syntaxhighlighter/scripts/shLegacy.js"></script> <script type="text/javascript" src="/static/syntaxhighlighter/scripts/shAutoloader.js"></script> <link type="text/css" rel="stylesheet" href="/static/syntaxhighlighter/styles/shCoreDefault.css"/> <script type="text/javascript" src="/static/syntaxhighlighter/src/my_start_1.js"></script> </body> </html>