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

网页框架布局设计

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/1892408764976394240.htm" title="Redis 全方位解析:从入门到实战" target="_blank">Redis 全方位解析:从入门到实战</a> <span class="text-muted">kiss strong</span> <a class="tag" taget="_blank" href="/search/redis/1.htm">redis</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/%E7%BC%93%E5%AD%98/1.htm">缓存</a> <div>引言在当今互联网快速发展的时代,高并发、低延迟的应用场景越来越普遍。Redis,作为一款高性能的开源数据库,以其卓越的性能和灵活的功能,成为了许多开发者的首选工具。无论是在缓存、消息队列,还是在实时数据分析等领域,Redis都展现出了强大的能力。本文将从Redis的基本介绍、官网、安装、特性,到具体的存储类型、Java代码实例、SpringBoot整合,以及Redis的主要作用和应用场景,进行全面</div> </li> <li><a href="/article/1892407376435277824.htm" title="前端开发入门指南:HTML、CSS和JavaScript基础知识" target="_blank">前端开发入门指南:HTML、CSS和JavaScript基础知识</a> <span class="text-muted">方向感超强的</span> <a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a><a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a> <div>引言:大家好,我是一名简单的前端开发爱好者,对于网页设计和用户体验的追求让我深深着迷。在本篇文章中,我将带领大家探索前端开发的基础知识,涵盖HTML、CSS和JavaScript。如果你对这个领域感兴趣,或者想要了解如何开始学习前端开发,那么这篇文章将为你提供一个良好的起点。1.前端开发概述在我们深入了解前端开发的细节之前,让我们先了解一下前端开发的定义和作用。简而言之,前端开发涉及构建用户直接与</div> </li> <li><a href="/article/1892406744987004928.htm" title="《Java高级-Xml:利用DOM4j解析XML》" target="_blank">《Java高级-Xml:利用DOM4j解析XML》</a> <span class="text-muted">大大大钢琴</span> <a class="tag" taget="_blank" href="/search/%23/1.htm">#</a><a class="tag" taget="_blank" href="/search/Java%EF%BC%9A%E7%BB%8F%E9%AA%8C%E6%80%BB%E7%BB%93/1.htm">Java:经验总结</a><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/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a> <div>利用DOM4j解析XMLdom4j是一个简单的开源库,用于处理XML、XPath和XSLT,它基于Java平台,使用Java的集合框架,全面集成了DOM,SAX和JAXP。dom4j是目前在xml解析方面是最优秀的(Hibernate、Sun的JAXM也都使用dom4j来解析XML),它合并了许多超出基本XML文档表示的功能,包括集成的XPath支持、XMLSchema支持以及用于大文档或流化文档</div> </li> <li><a href="/article/1892404728181092352.htm" title="React 渲染 Flash 接口数据" target="_blank">React 渲染 Flash 接口数据</a> <span class="text-muted">ox0080</span> <a class="tag" taget="_blank" href="/search/%23/1.htm">#</a><a class="tag" taget="_blank" href="/search/%E5%8C%97%E6%BC%82%2B%E6%BB%B4%E6%BB%B4%E5%87%BA%E8%A1%8C/1.htm">北漂+滴滴出行</a><a class="tag" taget="_blank" href="/search/VIP/1.htm">VIP</a><a class="tag" taget="_blank" href="/search/%E6%BF%80%E5%8A%B1/1.htm">激励</a><a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a><a class="tag" taget="_blank" href="/search/react.js/1.htm">react.js</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF%E6%A1%86%E6%9E%B6/1.htm">前端框架</a> <div>1.后端Python代码使用Flask创建多个接口,每个接口返回不同的数据,并使用自定义装饰器来绑定路由。代码:#app.pyfromflaskimportFlask,jsonifyapp=Flask(__name__)defapi_route(route,methods=['GET']):"""自定义装饰器,用于将函数与HTTP路由绑定"""defdecorator(func):app.rout</div> </li> <li><a href="/article/1892403467411058688.htm" title="网页中加载 SVG 的七大方式" target="_blank">网页中加载 SVG 的七大方式</a> <span class="text-muted">前端熊猫</span> <a class="tag" taget="_blank" href="/search/Svg/1.htm">Svg</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/svg/1.htm">svg</a><a class="tag" taget="_blank" href="/search/vue/1.htm">vue</a> <div>一、直接使用标签加载外部SVG文件优点:简单易用:与加载其他图片格式(如PNG、JPEG)相同。浏览器支持良好:现代浏览器普遍支持。可缓存:SVG文件可以被浏览器缓存,减少重复请求。缺点:无法直接操作SVG内部元素:如果需要对SVG内部的元素进行交互或样式修改,这种方法不适用。适用场景:静态图像展示:仅需要展示SVG图像,不需要与之交互。二、将SVG作为CSS背景图片.icon{width:100</div> </li> <li><a href="/article/1892402708804071424.htm" title="LQB---基础练习---十六进制转八进制" target="_blank">LQB---基础练习---十六进制转八进制</a> <span class="text-muted">「已注销」</span> <a class="tag" taget="_blank" href="/search/%23/1.htm">#</a><a class="tag" taget="_blank" href="/search/LQB/1.htm">LQB</a><a class="tag" taget="_blank" href="/search/LQB/1.htm">LQB</a> <div>试题基础练习十六进制转八进制资源限制内存限制:512.0MBC/C++时间限制:1.0sJava时间限制:3.0sPython时间限制:5.0s问题描述给定n个十六进制正整数,输出它们对应的八进制数。输入格式输入的第一行为一个正整数n(1<=n<=10)。接下来n行,每行一个由09、大写字母AF组成的字符串,表示要转换的十六进制正整数,每个十六进制数长度不超过100000。输出格式输出n行,每行为</div> </li> <li><a href="/article/1892401826364452864.htm" title="jQuery UI CSS 框架 API" target="_blank">jQuery UI CSS 框架 API</a> <span class="text-muted">lly202406</span> <a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a> <div>jQueryUICSS框架API概述jQueryUI是一个基于jQuery的用户界面和交互库,它提供了一套丰富的交互组件和视觉效果,旨在帮助开发者快速构建具有吸引力和互动性的网页应用。jQueryUICSS框架API是jQueryUI的一部分,它允许开发者通过简单的CSS类来控制UI组件的样式和外观。本文将详细介绍jQueryUICSS框架API的使用方法、常用类和功能,帮助开发者更好地利用这一工</div> </li> <li><a href="/article/1892400189780586496.htm" title="js如何直接下载文件流" target="_blank">js如何直接下载文件流</a> <span class="text-muted">涔溪</span> <a class="tag" taget="_blank" href="/search/js/1.htm">js</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/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>在JavaScript中直接处理文件下载,尤其是在处理文件流的情况下,通常涉及到使用fetchAPI或者XMLHttpRequest来获取文件流,并通过创建一个临时的标签(锚点元素)触发下载。以下是使用fetchAPI的一个示例:fetch('你的文件URL',{method:'GET',headers:{//如果需要的话,可以在这里添加请求头}}).then(response=>response</div> </li> <li><a href="/article/1892398803407925248.htm" title="部署前端项目2" target="_blank">部署前端项目2</a> <span class="text-muted">augenstern416</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a> <div>前端项目的部署是将开发完成的前端代码发布到服务器或云平台,使其能够通过互联网访问。以下是前端项目部署的常见步骤和工具:1.准备工作在部署之前,确保项目已经完成以下步骤:代码优化:压缩JavaScript、CSS和图片文件,减少文件体积。环境配置:区分开发环境和生产环境(如API地址、环境变量等)。测试:确保项目在本地测试通过,没有明显Bug。2.部署流程1.构建项目大多数前端项目(如React、V</div> </li> <li><a href="/article/1892398676270182400.htm" title="CSS属性" target="_blank">CSS属性</a> <span class="text-muted">augenstern416</span> <a class="tag" taget="_blank" href="/search/CSS/1.htm">CSS</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a> <div>1.CSS定位方式initial:设置该属性为浏览器默认值inherit:规定应该从父元素继承position属性的值。static:默认值。没有定位,元素出现在正常的流中(忽略top,bottom,left,right或者z-index声明)。relative:生成相对定位的元素,相对于其正常位置进行定位。因此,“left:20”会向元素的LEFT位置添加20像素。absolute:生成绝对定位</div> </li> <li><a href="/article/1892398677004185600.htm" title="对象的操作" target="_blank">对象的操作</a> <span class="text-muted">augenstern416</span> <a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</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/ecmascript/1.htm">ecmascript</a> <div>在前端开发中,JavaScript提供了许多内置对象和方法,用于处理数据、操作DOM、处理事件等。以下是一些常用对象及其方法和扩展技巧:1.Object对象Object是JavaScript中最基础的对象,几乎所有对象都继承自Object。常用方法Object.keys(obj):返回对象的所有可枚举属性的键名数组。constobj={a:1,b:2};console.log(Object.key</div> </li> <li><a href="/article/1892395273758502912.htm" title="【2025年】全国CTF夺旗赛-从零基础入门到竞赛,看这一篇就稳了!" target="_blank">【2025年】全国CTF夺旗赛-从零基础入门到竞赛,看这一篇就稳了!</a> <span class="text-muted">网安詹姆斯</span> <a class="tag" taget="_blank" href="/search/web%E5%AE%89%E5%85%A8/1.htm">web安全</a><a class="tag" taget="_blank" href="/search/CTF/1.htm">CTF</a><a class="tag" taget="_blank" href="/search/%E7%BD%91%E7%BB%9C%E5%AE%89%E5%85%A8%E5%A4%A7%E8%B5%9B/1.htm">网络安全大赛</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a> <div>【2025年】全国CTF夺旗赛-从零基础入门到竞赛,看这一篇就稳了!基于入门网络安全/黑客打造的:黑客&网络安全入门&进阶学习资源包目录一、CTF简介二、CTF竞赛模式三、CTF各大题型简介四、CTF学习路线4.1、初期1、html+css+js(2-3天)2、apache+php(4-5天)3、mysql(2-3天)4、python(2-3天)5、burpsuite(1-2天)4.2、中期1、S</div> </li> <li><a href="/article/1892392376316522496.htm" title="机器学习·文本数据读写处理" target="_blank">机器学习·文本数据读写处理</a> <span class="text-muted">AAA顶置摸鱼</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><a class="tag" taget="_blank" href="/search/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/1.htm">机器学习</a><a class="tag" taget="_blank" href="/search/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/1.htm">人工智能</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%A4%84%E7%90%86/1.htm">数据处理</a> <div>前言在自然语言处理的第一步,需要面对的是各种各样以不同形式表现的文本数据,比如,txt、Excel中的表格数据,还有无法直接打开的pkl文件等。针对这些不同类型的数据,可以基于Python中的基本功能函数或者调用某些库进行读写以及作一些基本的处理。一、文本数据读写方法1.读写TXT文件读取方法:read():读取整个文件,返回字符串。readline():逐行读取,返回字符串。readlines(</div> </li> <li><a href="/article/1892392249963114496.htm" title="LQB(4)-python-DFS搜索" target="_blank">LQB(4)-python-DFS搜索</a> <span class="text-muted">AAA顶置摸鱼</span> <a class="tag" taget="_blank" href="/search/%E8%93%9D%E6%A1%A5%E6%9D%AFpython%E7%BB%84/1.htm">蓝桥杯python组</a><a class="tag" taget="_blank" href="/search/%E6%B7%B1%E5%BA%A6%E4%BC%98%E5%85%88/1.htm">深度优先</a><a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E8%93%9D%E6%A1%A5%E6%9D%AF/1.htm">蓝桥杯</a> <div>前言DFS即深度优先搜索(Depth-FirstSearch),是一种用于遍历或搜索树或图的算法,有三种核心的应用场景(基础遍历、回溯、剪枝)。一、DFS-基础遍历1.核心原理深度优先搜索(DFS)是一种遍历或搜索树/图的算法,优先沿着一条路径尽可能深入,直到无法继续再回溯。实现方式:递归:隐式利用系统调用栈。栈模拟:显式使用栈数据结构。2.代码实现(1)递归实现(树结构)classTreeNod</div> </li> <li><a href="/article/1892390738520502272.htm" title="前端基础入门:HTML、CSS 和 JavaScript" target="_blank">前端基础入门:HTML、CSS 和 JavaScript</a> <span class="text-muted">阿绵</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</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/js/1.htm">js</a> <div>在现代网页开发中,前端技术扮演着至关重要的角色。无论是个人网站、企业官网,还是复杂的Web应用程序,前端开发的基础技术HTML、CSS和JavaScript都是每个开发者必须掌握的核心技能。本文将详细介绍这三者的基本概念及其应用一、HTML——网页的骨架HTML(HyperTextMarkupLanguage)是构建网页的基础语言。它是网页的结构和内容的标记语言,决定了网页上的文本、图像、表单等元</div> </li> <li><a href="/article/1892390108330520576.htm" title="Python中LLM的知识图谱构建:动态更新与推理" target="_blank">Python中LLM的知识图谱构建:动态更新与推理</a> <span class="text-muted">二进制独立开发</span> <a class="tag" taget="_blank" href="/search/GenAI%E4%B8%8EPython/1.htm">GenAI与Python</a><a class="tag" taget="_blank" href="/search/%E9%9D%9E%E7%BA%AF%E7%B2%B9GenAI/1.htm">非纯粹GenAI</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E7%9F%A5%E8%AF%86%E5%9B%BE%E8%B0%B1/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><a class="tag" taget="_blank" href="/search/%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86/1.htm">自然语言处理</a><a class="tag" taget="_blank" href="/search/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/1.htm">人工智能</a><a class="tag" taget="_blank" href="/search/%E5%88%86%E5%B8%83%E5%BC%8F/1.htm">分布式</a><a class="tag" taget="_blank" href="/search/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/1.htm">机器学习</a> <div>文章目录引言1.知识图谱的基本概念1.1知识图谱的定义1.2知识图谱的构建流程2.利用LLM进行知识抽取2.1实体识别2.2关系抽取2.3属性抽取3.知识融合3.1实体对齐3.2冲突消解4.知识存储5.知识推理5.1规则推理5.2基于LLM的推理6.动态更新6.1增量更新6.2实时更新7.结论引言随着人工智能技术的飞速发展,知识图谱(KnowledgeGraph,KG)作为一种结构化的知识表示方法</div> </li> <li><a href="/article/1892389477767245824.htm" title="网页制作03-html,css,javascript初认识のhtml的图像设置" target="_blank">网页制作03-html,css,javascript初认识のhtml的图像设置</a> <span class="text-muted">Ama_tor</span> <a class="tag" taget="_blank" href="/search/%E7%BD%91%E9%A1%B5%E5%88%B6%E4%BD%9C%E4%B8%93%E6%A0%8F/1.htm">网页制作专栏</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/%E5%89%8D%E7%AB%AF/1.htm">前端</a> <div>一、图像格式网页中图像的格式有三种,Gif,Jpeg,PngGif:Graphicinterchangeformat图像交换格式,文件最多可使用256种颜色,最适合显示色调不连续或具有大面积单一颜色的图像,例如导航条、按钮、图标、徽标或其他具有统一色彩和色调的图像;还可以制作动态图像Jpeg:Giantphotographicexpectgroup,它是一种图像压缩格式,可包含数百万种颜色,不支持</div> </li> <li><a href="/article/1892387966651789312.htm" title="Python's SQLAlchemy and Object-Relational Mapping" target="_blank">Python's SQLAlchemy and Object-Relational Mapping</a> <span class="text-muted">zhanglizhuo</span> <a class="tag" taget="_blank" href="/search/Python/1.htm">Python</a> <div>Acommontaskwhenprogramminganywebserviceistheconstructionofasoliddatabasebackend.Inthepast,programmerswouldwriterawSQLstatements,passthemtothedatabaseengineandparsethereturnedresultsasanormalarrayofrec</div> </li> <li><a href="/article/1892387965171200000.htm" title="java进阶篇--生产环境如何排查bug和优化 JVM?" target="_blank">java进阶篇--生产环境如何排查bug和优化 JVM?</a> <span class="text-muted">爱分享的淘金达人</span> <a class="tag" taget="_blank" href="/search/Java%E6%BA%90%E7%A0%81%E5%89%96%E6%9E%90%2830%E8%AE%B2%29/1.htm">Java源码剖析(30讲)</a><a class="tag" taget="_blank" href="/search/jvm%E4%BC%98%E5%8C%96/1.htm">jvm优化</a><a class="tag" taget="_blank" href="/search/jvm%E8%B0%83%E4%BC%98/1.htm">jvm调优</a><a class="tag" taget="_blank" href="/search/%E4%BC%98%E5%8C%96jvm/1.htm">优化jvm</a><a class="tag" taget="_blank" href="/search/%E7%94%9F%E4%BA%A7%E7%8E%AF%E5%A2%83%E4%BC%98%E5%8C%96jvm/1.htm">生产环境优化jvm</a><a class="tag" taget="_blank" href="/search/%E7%94%9F%E4%BA%A7%E7%8E%AF%E5%A2%83jvm%E4%BC%98%E5%8C%96/1.htm">生产环境jvm优化</a> <div>通过前面几个课时的学习,相信你对JVM的理论及实践等相关知识有了一个大体的印象。而本课时将重点讲解JVM的排查与优化,这样就会对JVM的知识点有一个完整的认识,从而可以更好地应用于实际工作或者面试了。我们本课时的面试题是,生产环境如何排查问题?回答:如果是在生产环境中直接排查JVM的话,最简单的做法就是使用JDK自带的6个非常实用的命令行工具来排查。它们分别是:jps、jstat、jinfo、jm</div> </li> <li><a href="/article/1892387335333539840.htm" title="Jira,一个强大灵活的项目和任务管理工具 Python 库" target="_blank">Jira,一个强大灵活的项目和任务管理工具 Python 库</a> <span class="text-muted">图灵学者</span> <a class="tag" taget="_blank" href="/search/python%E7%B2%BE%E5%8D%8E/1.htm">python精华</a><a class="tag" taget="_blank" href="/search/jira/1.htm">jira</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>目录01初识Jira为什么选择Jira?02安装与配置安装jira库配置Jira访问获取APItoken:配置Python环境:03基本操作创建项目创建任务查询任务更新任务删除任务04高级操作处理子任务搜索任务添加附件评论任务05实战案例自动化创建与分配任务自动生成项目报告06结语01初识JiraJira是Atlassian公司开发的一款项目和任务管理工具。它广泛应用于软件开发、IT支持、营销等各</div> </li> <li><a href="/article/1892386200312934400.htm" title="JavaScript——操作浏览器窗口" target="_blank">JavaScript——操作浏览器窗口</a> <span class="text-muted">yiqi_perss</span> <a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a> <div>学习内容:今天学习了alert提示框,提示框中的内容,就是alert后边小括号中的内容例如:alert('我要学JavaScript!');alert('我要学习!');学习总结:日常小总结例如:后面的分号;可以随便去掉,不影响运行效果。不能去掉小括号,否则会报错,不信你可以试试。必须是英文引号,否则会报错。课外扩展:历史渊源例如:ECMAScript是一种语言标准,而JavaScript是网景公</div> </li> <li><a href="/article/1892385948155572224.htm" title="JVM内存模型分区" target="_blank">JVM内存模型分区</a> <span class="text-muted">Lionel·</span> <a class="tag" taget="_blank" href="/search/java%E5%9F%BA%E7%A1%80/1.htm">java基础</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/jvm/1.htm">jvm</a> <div>JVM内存模型划分根据JVM规范,JVM内存共分为Java虚拟机栈,本地方法栈,堆,方法区,程序计数器,五个部分。1.Java堆(线程共享)Java堆是被所有线程共享的一块内存区域,在虚拟机启动时创建。此内存区域的唯一目的就是存放对象实例,几乎所有的对象实例以及数组都要在堆上分配。Java堆是垃圾收集器管理的主要区域,因此很多时候也被称做“GC堆”。从内存回收的角度看,由于现在收集器基本都采用分代</div> </li> <li><a href="/article/1892385064558325760.htm" title="使用LlamaIndex查询 MongoDB 数据库,并获取 OSS (对象存储服务) 上的 PDF 文件,最终用Langchain搭建应用" target="_blank">使用LlamaIndex查询 MongoDB 数据库,并获取 OSS (对象存储服务) 上的 PDF 文件,最终用Langchain搭建应用</a> <span class="text-muted">朴拙Python交易猿</span> <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/mongodb/1.htm">mongodb</a><a class="tag" taget="_blank" href="/search/pdf/1.htm">pdf</a> <div>使用LlamaIndex查询MongoDB数据库,并获取OSS(对象存储服务)上的PDF文件,然后利用Langchain搭建应用,涉及多个步骤。下面我们将详细介绍如何将这些步骤结合起来,构建一个系统:1.环境准备首先,确保你已经安装了以下Python库:pipinstallllama_indexpymongolangchainopenaiboto3pdfplumberpymongo:MongoDB</div> </li> <li><a href="/article/1892385065640456192.htm" title="MapReduce 读取 Hive ORC ArrayIndexOutOfBoundsException: 1024 异常解决" target="_blank">MapReduce 读取 Hive ORC ArrayIndexOutOfBoundsException: 1024 异常解决</a> <span class="text-muted">一张假钞</span> <a class="tag" taget="_blank" href="/search/mapreduce/1.htm">mapreduce</a><a class="tag" taget="_blank" href="/search/hive/1.htm">hive</a><a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%95%B0%E6%8D%AE/1.htm">大数据</a> <div>个人博客地址:MapReduce读取HiveORCArrayIndexOutOfBoundsException:1024异常解决|一张假钞的真实世界在MR处理ORC的时候遇到如下异常:Exceptioninthread"main"java.lang.ArrayIndexOutOfBoundsException:1024atorg.apache.orc.impl.RunLengthIntegerRe</div> </li> <li><a href="/article/1892383549701550080.htm" title="python 连接 jira" target="_blank">python 连接 jira</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/jira/1.htm">jira</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连接到Jira实例、登录、查询、修改和创建bug首先,你需要安装jiraPython库pip3installjira连接到Jira并登录fromjiraimportJIRAfromjira.exceptionsimportJIRAError#Jira服务器地址,用户名和密码jira_server='https://your-jira-server.com'jira_user='your</div> </li> <li><a href="/article/1892383167155859456.htm" title="python调用接口返回401,带有Python的Jira API在有效凭据上返回错误401" target="_blank">python调用接口返回401,带有Python的Jira API在有效凭据上返回错误401</a> <span class="text-muted">weixin_39743369</span> <a class="tag" taget="_blank" href="/search/python%E8%B0%83%E7%94%A8%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E401/1.htm">python调用接口返回401</a> <div>IamtryingtousetheJirapythonlibrarytodosomequitebasicthings.Evenbeforedoinganything,theconstructorfails.address='https://myaddress.atlassian.net'options={'server':address}un='my@user.com'#un='my'#alsod</div> </li> <li><a href="/article/1892382788234047488.htm" title="python邮件发送哪个好_(原创)python发送邮件" target="_blank">python邮件发送哪个好_(原创)python发送邮件</a> <span class="text-muted">加勒比考斯</span> <a class="tag" taget="_blank" href="/search/python%E9%82%AE%E4%BB%B6%E5%8F%91%E9%80%81%E5%93%AA%E4%B8%AA%E5%A5%BD/1.htm">python邮件发送哪个好</a> <div>这段时间一直在学习flask框架,看到flask扩展中有一个mail插件,所以今天就给大家演示如果发邮件。首先我注册了一个163邮箱,需要开启smtp功能,(网易的电子邮件服务器)。注册好163邮箱,然后开启smtp功能,如下图所示:开启的过程中需要绑定手机。我最终实现的样子是这样的:使用flask搭建了一个web服务器,然后做了一个网页,将收件人,主题,正文填好之后,点击发送,上面会显示发送结果</div> </li> <li><a href="/article/1892378374161100800.htm" title="记录一次进程被操作系统强制终止(OOM Killer)" target="_blank">记录一次进程被操作系统强制终止(OOM Killer)</a> <span class="text-muted">别告诉我有BUG</span> <a class="tag" taget="_blank" href="/search/jvm/1.htm">jvm</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a> <div>问题背景场景:在一次系统迁移中,团队将原本运行在16G内存物理机的Java服务迁移到8G内存虚拟机,直接复用了原有的JVM参数(如-Xmx12g)。服务启动后运行正常,但几小时后突然宕机,日志中无明确错误,仅显示进程终止。影响:服务不可用持续30分钟部分业务数据丢失,用户投诉激增分析过程1.初步排查现象确认:进程消失,无Java堆栈或异常日志。系统日志/var/log/messages中发现OOM</div> </li> <li><a href="/article/1892374590433325056.htm" title="如何用 python 获取实时的股票数据?_python efinance(2)" target="_blank">如何用 python 获取实时的股票数据?_python efinance(2)</a> <span class="text-muted">元点三</span> <a class="tag" taget="_blank" href="/search/2024%E5%B9%B4%E7%A8%8B%E5%BA%8F%E5%91%98%E5%AD%A6%E4%B9%A0/1.htm">2024年程序员学习</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/linux/1.htm">linux</a> <div>先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!因此收集整理了一份《2024年最新Python全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课</div> </li> <li><a href="/article/1892374591150551040.htm" title="如何用 python 获取实时的股票数据?_python efinance,2024年最新pdf面试简历" target="_blank">如何用 python 获取实时的股票数据?_python efinance,2024年最新pdf面试简历</a> <span class="text-muted">元点三</span> <a class="tag" taget="_blank" href="/search/2024%E5%B9%B4%E7%A8%8B%E5%BA%8F%E5%91%98%E5%AD%A6%E4%B9%A0/1.htm">2024年程序员学习</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/pdf/1.htm">pdf</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95/1.htm">面试</a> <div>先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!因此收集整理了一份《2024年最新Python全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课</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>