﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-V8微商网_www.vip3158.com---时代创业网_www.sdcye.com</title><link>http://www.blogjava.net/seoyouhua/</link><description>V8微商网_www.vip3158.com---时代创业网_www.sdcye.com</description><language>zh-cn</language><lastBuildDate>Fri, 24 Apr 2026 16:23:37 GMT</lastBuildDate><pubDate>Fri, 24 Apr 2026 16:23:37 GMT</pubDate><ttl>60</ttl><item><title>Java 接口</title><link>http://www.blogjava.net/seoyouhua/archive/2016/10/09/431876.html</link><dc:creator>V8微商网</dc:creator><author>V8微商网</author><pubDate>Sun, 09 Oct 2016 12:33:00 GMT</pubDate><guid>http://www.blogjava.net/seoyouhua/archive/2016/10/09/431876.html</guid><wfw:comment>http://www.blogjava.net/seoyouhua/comments/431876.html</wfw:comment><comments>http://www.blogjava.net/seoyouhua/archive/2016/10/09/431876.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/seoyouhua/comments/commentRss/431876.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/seoyouhua/services/trackbacks/431876.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 接口（英文：Interface），在JAVA编程语言中是一个抽象类型，是抽象方法的集合，接口通常以interface来声明。一个类通过继承接口的方式，从而来继承接口的抽象方法。接口并不是类，编写接口的方式和类很相似，但是它们属于不同的概念。类描述对象的属性和方法。接口则包含类要实现的方法。除非实现接口的类是抽象类，否则该类要定义接口中的所有方法。接口无法被实例化，但是可以被实现。一个实...&nbsp;&nbsp;<a href='http://www.blogjava.net/seoyouhua/archive/2016/10/09/431876.html'>阅读全文</a><img src ="http://www.blogjava.net/seoyouhua/aggbug/431876.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/seoyouhua/" target="_blank">V8微商网</a> 2016-10-09 20:33 <a href="http://www.blogjava.net/seoyouhua/archive/2016/10/09/431876.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>逗号表达式语法</title><link>http://www.blogjava.net/seoyouhua/archive/2016/10/01/431856.html</link><dc:creator>V8微商网</dc:creator><author>V8微商网</author><pubDate>Sat, 01 Oct 2016 13:30:00 GMT</pubDate><guid>http://www.blogjava.net/seoyouhua/archive/2016/10/01/431856.html</guid><wfw:comment>http://www.blogjava.net/seoyouhua/comments/431856.html</wfw:comment><comments>http://www.blogjava.net/seoyouhua/archive/2016/10/01/431856.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/seoyouhua/comments/commentRss/431856.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/seoyouhua/services/trackbacks/431856.html</trackback:ping><description><![CDATA[<pre style="border-bottom: rgb(0,153,204) 1px solid; border-left: rgb(0,153,204) 1px solid; padding-bottom: 15px; widows: 1; text-transform: none; text-indent: 0px; margin: 15px 0px; padding-left: 20px; padding-right: 20px; font: 12px/18px monospace; white-space: pre-wrap;background: rgb(221,237,251); letter-spacing: normal; color: rgb(0,0,0); clear: both; border-top: rgb(0,153,204) 1px solid; border-right: rgb(0,153,204) 1px solid; word-spacing: 0px; padding-top: 15px; -webkit-text-stroke-width: 0px; border-radius: 6px" class="js"><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">a</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">+</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">b</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">,</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">c</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">+</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">d</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">,</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">e</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">+</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">f</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag"> ... </code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">y</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">+</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">z</code>
</pre>
<h3 style="line-height: 18px; widows: 1; text-transform: none; font-variant: normal; font-style: normal; text-indent: 0px; margin: 1em; font-family: arial, sans-serif; white-space: normal; letter-spacing: normal; color: rgb(51,102,204); clear: both; font-size: 13px; word-spacing: 0px; -webkit-text-stroke-width: 0px">逗号表达式示例</h3>
<p style="widows: 1; text-transform: none; text-indent: 2em; font: 14px/18px arial, sans-serif; white-space: normal; margin-bottom: 1em; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-stroke-width: 0px">逗号表达式允许一条语句中执行多个表达式，例如</p><pre style="border-bottom: rgb(0,153,204) 1px solid; border-left: rgb(0,153,204) 1px solid; padding-bottom: 15px; widows: 1; text-transform: none; text-indent: 0px; margin: 15px 0px; padding-left: 20px; padding-right: 20px; font: 12px/18px monospace; white-space: pre-wrap;background: rgb(221,237,251); letter-spacing: normal; color: rgb(0,0,0); clear: both; border-top: rgb(0,153,204) 1px solid; border-right: rgb(0,153,204) 1px solid; word-spacing: 0px; padding-top: 15px; -webkit-text-stroke-width: 0px; border-radius: 6px" class="js"><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">var</code> <code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">a</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">=</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: red; font-size: 14px; font-weight: normal" class="attrvalue">5</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">,</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">b</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">=</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: red; font-size: 14px; font-weight: normal" class="attrvalue">6</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">,</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">c</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">=</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: red; font-size: 14px; font-weight: normal" class="attrvalue">7</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">,</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">a</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">=</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">b</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">+</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">c</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">,</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">c</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">=</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">a</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">+</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">b</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">;</code>
</pre>
<p style="widows: 1; text-transform: none; text-indent: 2em; font: 14px/18px arial, sans-serif; white-space: normal; margin-bottom: 1em; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-stroke-width: 0px">上面并非优美的语句，因为赋值表达式与加法表达式同时在一个逗号表达式中，容易产生混乱。最好把单一功能的表达式合并。</p><pre style="border-bottom: rgb(0,153,204) 1px solid; border-left: rgb(0,153,204) 1px solid; padding-bottom: 15px; widows: 1; text-transform: none; text-indent: 0px; margin: 15px 0px; padding-left: 20px; padding-right: 20px; font: 12px/18px monospace; white-space: pre-wrap;background: rgb(221,237,251); letter-spacing: normal; color: rgb(0,0,0); clear: both; border-top: rgb(0,153,204) 1px solid; border-right: rgb(0,153,204) 1px solid; word-spacing: 0px; padding-top: 15px; -webkit-text-stroke-width: 0px; border-radius: 6px" class="js"><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">var</code> <code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">a</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">=</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: red; font-size: 14px; font-weight: normal" class="attrvalue">5</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">,</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">b</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">=</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: red; font-size: 14px; font-weight: normal" class="attrvalue">6</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">,</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">c</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">=</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: red; font-size: 14px; font-weight: normal" class="attrvalue">7</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">;</code>
<code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">a</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">=</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">b</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">+</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">c</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">,</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">c</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">=</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">a</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">+</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: blue; font-size: 14px; font-weight: normal" class="attr">b</code><code style="background-color: transparent; margin: 0px 0.1em; font-family: monospace; color: green; font-size: 14px; font-weight: normal" class="tag">;</code></pre><img src ="http://www.blogjava.net/seoyouhua/aggbug/431856.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/seoyouhua/" target="_blank">V8微商网</a> 2016-10-01 21:30 <a href="http://www.blogjava.net/seoyouhua/archive/2016/10/01/431856.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JavaScript教程：适合新手的js代码使用方法和技巧大全</title><link>http://www.blogjava.net/seoyouhua/archive/2016/10/01/431855.html</link><dc:creator>V8微商网</dc:creator><author>V8微商网</author><pubDate>Sat, 01 Oct 2016 13:28:00 GMT</pubDate><guid>http://www.blogjava.net/seoyouhua/archive/2016/10/01/431855.html</guid><wfw:comment>http://www.blogjava.net/seoyouhua/comments/431855.html</wfw:comment><comments>http://www.blogjava.net/seoyouhua/archive/2016/10/01/431855.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/seoyouhua/comments/commentRss/431855.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/seoyouhua/services/trackbacks/431855.html</trackback:ping><description><![CDATA[<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">本文把有关JavaScript的方法和技巧整理下，让每个在为JavaScript而烦恼的人明白，JavaScript就这么回事！并希望JavaScript还可以成为你的朋友，让你豁然开朗，在项目中更好的应用～ 适合阅读范围：对JavaScript一无所知～离精通只差一步之遥的人</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">有些时候你精通一门语言，但是会发现你其实整天在和其它语言打交道，也许你以为这些微不足道，不至于影响你的开发进度，但恰恰是这些你不重视的东西会浪费你很多时间，我一直以为我早在几年前就已经精通JavaScript了，直到目前，我才越来越觉得JavaScript远比我想象的复杂和强大，我开始崇拜它，就像崇拜所有OOP语言一样～</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">趁着节日的空隙，把有关JavaScript的方法和技巧整理下，让每个在为JavaScript而烦恼的人明白，JavaScript就这么回事！并希望JavaScript还可以成为你的朋友，让你豁然开朗，在项目中更好的应用～</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">适合阅读范围：对JavaScript一无所知～离精通只差一步之遥的人</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">基础知识：HTML</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">JavaScript就这么回事：基础知识</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">1 创建脚本块</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">&lt;script language="JavaScript"&gt;<br />JavaScript code goes here<br />&lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">2 隐藏脚本代码</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 &lt;script language="JavaScript"&gt;<br />2 &lt;!--<br />3 document.write("Hello");<br />4 // --&gt;<br />5 &lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">在不支持JavaScript的浏览器中将不执行相关代码</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">3 浏览器不支持的时候显示</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 &lt;noscript&gt;<br />2 Hello to the non-JavaScript browser.<br />3 &lt;/noscript&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">4 链接外部脚本文件</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 &lt;script language="JavaScript" src="filename.js"&gt;&lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">5 注释脚本</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 // This is a comment<br />2 document.write("Hello"); // This is a comment<br />3 /*<br />4 All of this<br />5 is a comment<br />6 */</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">6 输出到浏览器</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 document.write("&lt;strong&gt;Hello&lt;/strong&gt;");</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">7 定义变量</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 var myVariable = "some value";</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">8 字符串相加</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 var myString = "String1" + "String2";</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">9 字符串搜索</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 &lt;script language="JavaScript"&gt;<br />2 &lt;!--<br />3 var myVariable = "Hello there";<br />4 var therePlace = myVariable.search("there");<br />5 document.write(therePlace);<br />6 // --&gt;<br />7 &lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">10 字符串替换</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 thisVar.replace("Monday","Friday");</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">11 格式化字串</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">01 &lt;script language="JavaScript"&gt;<br />02 &lt;!--<br />03 var myVariable = 'Hello there";<br />04 document.write(myVariable.big() + "&lt;br&gt;");<br />05 document.write(myVariable.blink() + "&lt;br&gt;");<br />06 document.write(myVariable.bold() + "&lt;br&gt;");<br />07 document.write(myVariable.fixed() + "&lt;br&gt;");<br />08 document.write(myVariable.fontcolor("red") + "&lt;br&gt;");<br />09 document.write(myVariable.fontsize("18pt") + "&lt;br&gt;");<br />10 document.write(myVariable.italics() + "&lt;br&gt;");<br />11 document.write(myVariable.small() + "&lt;br&gt;");<br />12 document.write(myVariable.strike() + "&lt;br&gt;");<br />13 document.write(myVariable.sub() + "&lt;br&gt;");<br />14 document.write(myVariable.sup() + "&lt;br&gt;");<br />15 document.write(myVariable.toLowerCase() + "&lt;br&gt;");<br />16 document.write(myVariable.toUpperCase() + "&lt;br&gt;");<br />17 var firstString = "My String";<br />18 var finalString = firstString.bold().toLowerCase().fontcolor("red");<br />19 // --&gt;<br />20 &lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">12 创建数组</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">01 &lt;script language="JavaScript"&gt;<br />02 &lt;!--<br />03 var myArray = new Array(5);<br />04 myArray[0] = "First Entry";<br />05 myArray[1] = "Second Entry";<br />06 myArray[2] = "Third Entry";<br />07 myArray[3] = "Fourth Entry";<br />08 myArray[4] = "Fifth Entry";<br />09 var anotherArray = new Array("First Entry","Second Entry","Third Entry","Fourth Entry","Fifth Entry");<br />10 // --&gt;<br />11 &lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">13 数组排序</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">01 &lt;script language="JavaScript"&gt;<br />02 &lt;!--<br />03 var myArray = new Array(5);<br />04 myArray[0] = "z";<br />05 myArray[1] = "c";<br />06 myArray[2] = "d";<br />07 myArray[3] = "a";<br />08 myArray[4] = "q";<br />09 document.write(myArray.sort());<br />10 // --&gt;<br />11 &lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">14 分割字符串</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">01 &lt;script language="JavaScript"&gt;<br />02 &lt;!--<br />03 var myVariable = "a,b,c,d";<br />04 var stringArray = myVariable.split(",");<br />05 document.write(stringArray[0]);<br />06 document.write(stringArray[1]);<br />07 document.write(stringArray[2]);<br />08 document.write(stringArray[3]);<br />09 // --&gt;<br />10 &lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">15 弹出警告信息</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 &lt;script language="JavaScript"&gt;<br />2 &lt;!--<br />3 window.alert("Hello");<br />4 // --&gt;<br />5 &lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">16 弹出确认框</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 &lt;script language="JavaScript"&gt;<br />2 &lt;!--<br />3 var result = window.confirm("Click OK to continue");<br />4 // --&gt;<br />5 &lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">17 定义函数</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 &lt;script language="JavaScript"&gt;<br />2 &lt;!--<br />3 function multiple(number1,number2) {<br />4 var result = number1 * number2;<br />5 return result;<br />6 }<br />7 // --&gt;<br />8 &lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">18 调用JS函数</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 &lt;a href="#" onClick="functionName()"&gt;Link text&lt;/a&gt;<br />2 &lt;a href="http://www.5icool.org"javascript:functionName"()"&gt;Link text&lt;/a&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">19 在页面加载完成后执行函数</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 &lt;body onLoad="functionName();"&gt;<br />2 Body of the page<br />3 &lt;/body&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">20 条件判断</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 &lt;script&gt;<br />2 &lt;!--<br />3 var userChoice = window.confirm("Choose OK or Cancel");<br />4 var result = (userChoice == true) ? "OK" : "Cancel";<br />5 document.write(result);<br />6 // --&gt;<br />7 &lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">21 指定次数循环</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">01 &lt;script&gt;<br />02 &lt;!--<br />03 var myArray = new Array(3);<br />04 myArray[0] = "Item 0";<br />05 myArray[1] = "Item 1";<br />06 myArray[2] = "Item 2";<br />07 for (i = 0; i &lt; myArray.length; i++) {<br />08 document.write(myArray[i] + "&lt;br&gt;");<br />09 }<br />10 // --&gt;<br />11 &lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">22 设定将来执行</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 &lt;script&gt;<br />2 &lt;!--<br />3 function hello() {<br />4 window.alert("Hello");<br />5 }<br />6 window.setTimeout("hello()",5000);<br />7 // --&gt;<br />8 &lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">23 定时执行函数</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 &lt;script&gt;<br />2 &lt;!--<br />3 function hello() {<br />4 window.alert("Hello");<br />5 window.setTimeout("hello()",5000);<br />6 }<br />7 window.setTimeout("hello()",5000);<br />8 // --&gt;<br />9 &lt;/script&gt;</p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px"><strong style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px;background: none transparent scroll repeat 0% 0%; font-size: 14px; vertical-align: top; border-top: 0px; border-right: 0px; padding-top: 0px">24 取消定时执行</strong></p>
<p style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; widows: 1; text-transform: none; text-indent: 2em; margin: 20px 0px; outline-style: none; outline-color: invert; padding-left: 0px; outline-width: 0px; padding-right: 0px; font: 14px/23px 新宋体, 'courier new', courier, monospace; word-wrap: break-word; white-space: normal;background: rgb(251,251,251); letter-spacing: normal; color: rgb(37,37,37); vertical-align: top; border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1 &lt;script&gt;<br />2 &lt;!--<br />3 function hello() {<br />4 window.alert("Hello");<br />5 }<br />6 var myTimeout = window.setTimeout("hello()",5000);<br />7 window.clearTimeout(myTimeout);<br />8 // --&gt;<br />9 &lt;/script&gt;　</p><img src ="http://www.blogjava.net/seoyouhua/aggbug/431855.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/seoyouhua/" target="_blank">V8微商网</a> 2016-10-01 21:28 <a href="http://www.blogjava.net/seoyouhua/archive/2016/10/01/431855.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JSP中向cookie写入中文乱码解决方法</title><link>http://www.blogjava.net/seoyouhua/archive/2016/09/05/431746.html</link><dc:creator>V8微商网</dc:creator><author>V8微商网</author><pubDate>Mon, 05 Sep 2016 12:24:00 GMT</pubDate><guid>http://www.blogjava.net/seoyouhua/archive/2016/09/05/431746.html</guid><wfw:comment>http://www.blogjava.net/seoyouhua/comments/431746.html</wfw:comment><comments>http://www.blogjava.net/seoyouhua/archive/2016/09/05/431746.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/seoyouhua/comments/commentRss/431746.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/seoyouhua/services/trackbacks/431746.html</trackback:ping><description><![CDATA[<span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">在jsp中对中文的处理有一点不好就可能出现乱码了，下面我来给大家介绍jsp中向cookie写入中文实现程序有需要了解的朋友可参考。</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">Cookie不能直接存中文，中文必须编码成asccii串才行，可以这样做 (http://www.javaweb.cc搜集整理)</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">代码如下</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">String str = java.net.URLEncoder.encode(中文);</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">得到编码后的字符串</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">取出后这样解码：</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">代码如下</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">String str = java.net.URLDecoder.decode(编码后的字符串);</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><strong style="font-size: 14px; font-family: Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; font-variant: normal; white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; font-style: normal; padding-top: 0px; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; line-height: 25px; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">具体方法</strong><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">一般是这样一个过程 字符串转码==》存入cookie===》读取cookie==》转码==》显示</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><strong style="font-size: 14px; font-family: Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; font-variant: normal; white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; font-style: normal; padding-top: 0px; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; line-height: 25px; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">第一步：写入cookie时先进行编码</strong><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">代码如下</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">Cookie cookie=new Cookie("groupMembersList",URLEncoder.encode (groupMembersList,"GBK")); //默认为临时Cookie,MaxAge&lt;0</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">//cookie.setMaxAge(-1);</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">response.addCookie(cookie);</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><strong style="font-size: 14px; font-family: Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; font-variant: normal; white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; font-style: normal; padding-top: 0px; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; line-height: 25px; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">第二步：读取cookie再进行解码</strong><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">代码如下</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&lt;%</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">Cookie[] cookies=request.getCookies();</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">for(Cookie cookie:cookies){</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">if(cookie.getName().equalsIgnoreCase("groupMembersList"))</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">request.setAttribute("group",URLDecoder.decode(cookie.getValue(),"GBK"));</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">}</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">%&gt;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&lt;c:out value="${requestScope.group }"/&gt;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><strong style="font-size: 14px; font-family: Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; font-variant: normal; white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; font-style: normal; padding-top: 0px; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; line-height: 25px; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">还有一种办法</strong><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">代码如下</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">try{</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">Cookie cookie = new Cookie(name, new String(value.getBytes("GBK"), "ISO8859-1"));</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">cookie.setDomain(this.domain);</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">cookie.setPath("/");</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">cookie.setMaxAge(120 * 1000);</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">response.addCookie(cookie);</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">}catch (Exception e){</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">e.printStackTrace();</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">}</span><img src ="http://www.blogjava.net/seoyouhua/aggbug/431746.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/seoyouhua/" target="_blank">V8微商网</a> 2016-09-05 20:24 <a href="http://www.blogjava.net/seoyouhua/archive/2016/09/05/431746.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java使用poi对Execl简单写操作</title><link>http://www.blogjava.net/seoyouhua/archive/2016/09/05/431745.html</link><dc:creator>V8微商网</dc:creator><author>V8微商网</author><pubDate>Mon, 05 Sep 2016 12:23:00 GMT</pubDate><guid>http://www.blogjava.net/seoyouhua/archive/2016/09/05/431745.html</guid><wfw:comment>http://www.blogjava.net/seoyouhua/comments/431745.html</wfw:comment><comments>http://www.blogjava.net/seoyouhua/archive/2016/09/05/431745.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/seoyouhua/comments/commentRss/431745.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/seoyouhua/services/trackbacks/431745.html</trackback:ping><description><![CDATA[<span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">Java使用poi对Execl简单写操作</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">public class WriteExecl {</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;public void writeExeclTest() throws Exception{</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OutputStream os = new FileOutputStream("F:/execl/writeTest2.xlsx");</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Workbook wb = new HSSFWorkbook(); // 创建一个 2003 版本的Execl</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Workbook wb = new XSSFWorkbook(); // 创建一个 2007 以上版本的Execl</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CellStyle cellStyle = wb.createCellStyle(); // 创建一个样式</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cellStyle.setBorderLeft(CellStyle.BORDER_THIN); // 单元格边框粗细</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cellStyle.setBorderRight(CellStyle.BORDER_THIN);// 单元格边框粗细</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cellStyle.setBorderTop(CellStyle.BORDER_THIN);// 单元格边框假粗细</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cellStyle.setBorderBottom(CellStyle.BORDER_THIN);// 单元格边框粗细</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cellStyle.setAlignment(CellStyle.ALIGN_CENTER); // 水平居中&nbsp;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cellStyle.setVerticalAlignment(CellStyle.VERTICAL_CENTER); // 垂直居中</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cellStyle.setBottomBorderColor(IndexedColors.RED.getIndex()); // 设置底边框为红色</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cellStyle.setFillForegroundColor(IndexedColors.DARK_YELLOW.getIndex()); // 设置前景色</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cellStyle.setFillPattern(CellStyle.SOLID_FOREGROUND); // 设置单元格填充颜色</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sheet sheet = wb.createSheet("第一个sheet"); // 创建一个名字的sheet</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sheet.setDefaultColumnWidth(1000); // 设置sheet中的默认宽度</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sheet.setDefaultRowHeight((short) 800); // 设置sheet中的默认高度</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Row row = sheet.createRow(0); // 创建一行</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;row.createCell(0, Cell.CELL_TYPE_BLANK); // 创建一个blank的单元格</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;row.createCell(1, Cell.CELL_TYPE_BOOLEAN).setCellValue(true); // 创建一个boolean的单元格</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;row.createCell(2, Cell.CELL_TYPE_FORMULA).setCellValue(3.141592653); // 创建一个formula的单元格</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;row.createCell(3, Cell.CELL_TYPE_NUMERIC).setCellValue(0); // 创建一个numeric的单元格</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;row.createCell(4, Cell.CELL_TYPE_STRING).setCellValue("String..."); // 创建一个string的单元格</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;row.setRowStyle(cellStyle); // 设置行的样式</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wb.write(os); // 向内存中的Execl写出orkbook工作簿</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;os.close(); // 记得关闭流，释放资源</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;}</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">}</span><img src ="http://www.blogjava.net/seoyouhua/aggbug/431745.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/seoyouhua/" target="_blank">V8微商网</a> 2016-09-05 20:23 <a href="http://www.blogjava.net/seoyouhua/archive/2016/09/05/431745.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用JavaScript实现页面定时跳转并显示倒计时</title><link>http://www.blogjava.net/seoyouhua/archive/2016/09/05/431744.html</link><dc:creator>V8微商网</dc:creator><author>V8微商网</author><pubDate>Mon, 05 Sep 2016 12:22:00 GMT</pubDate><guid>http://www.blogjava.net/seoyouhua/archive/2016/09/05/431744.html</guid><wfw:comment>http://www.blogjava.net/seoyouhua/comments/431744.html</wfw:comment><comments>http://www.blogjava.net/seoyouhua/archive/2016/09/05/431744.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/seoyouhua/comments/commentRss/431744.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/seoyouhua/services/trackbacks/431744.html</trackback:ping><description><![CDATA[<span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">使用JavaScript实现页面定时跳转并显示倒计时</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><strong style="font-size: 14px; font-family: Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; font-variant: normal; white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; font-style: normal; padding-top: 0px; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; line-height: 25px; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">1.创建一个就简单的页面</strong><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&lt;!DOCTYPE html&gt;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&lt;html lang="en"&gt;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&lt;head&gt;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&lt;meta charset="UTF-8"&gt;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&lt;title&gt;页面定时自动跳转并显示倒计时&lt;/title&gt;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&lt;/head&gt;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&lt;body&gt;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&lt;h1&gt;自动跳转：&lt;span id="wait"&gt;4&lt;/span&gt;&lt;/h1&gt;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&lt;/body&gt;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&lt;/html&gt;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><strong style="font-size: 14px; font-family: Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; font-variant: normal; white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; font-style: normal; padding-top: 0px; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; line-height: 25px; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">2.js函数</strong><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">/**</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp; * 定时跳转</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp; * href 要跳转的链接</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp; * elemId 显示时间元素</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp; */</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">function TimeLocation(href,elemId){</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">var elem = document.getElementById(elemId);</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">var interval = setInterval(function(){</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var time = --elem.innerHTML;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp; if(time &lt;= 0) {</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp; location.href = href;</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp;&nbsp; clearInterval(interval);</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">&nbsp; }</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">},1000);</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">}</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><strong style="font-size: 14px; font-family: Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; font-variant: normal; white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; font-style: normal; padding-top: 0px; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; line-height: 25px; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">3.调用</strong><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">window.onload=function(){</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">TimeLocation('localhost','wait');</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">}</span><img src ="http://www.blogjava.net/seoyouhua/aggbug/431744.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/seoyouhua/" target="_blank">V8微商网</a> 2016-09-05 20:22 <a href="http://www.blogjava.net/seoyouhua/archive/2016/09/05/431744.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用 Google-Code-Prettify 实现代码高亮功能</title><link>http://www.blogjava.net/seoyouhua/archive/2016/09/05/431743.html</link><dc:creator>V8微商网</dc:creator><author>V8微商网</author><pubDate>Mon, 05 Sep 2016 12:21:00 GMT</pubDate><guid>http://www.blogjava.net/seoyouhua/archive/2016/09/05/431743.html</guid><wfw:comment>http://www.blogjava.net/seoyouhua/comments/431743.html</wfw:comment><comments>http://www.blogjava.net/seoyouhua/archive/2016/09/05/431743.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/seoyouhua/comments/commentRss/431743.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/seoyouhua/services/trackbacks/431743.html</trackback:ping><description><![CDATA[<span style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">使用 Google Prettify 实现代码高亮</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">今天这篇文章主要讲述使用 google-code-prettify 来实现代码的高亮显示，prettify 非常小巧且配置简单，使用它来实现代码的高亮显示是个不错的选择。</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">下边我们简单看看 prettify.js 的使用方法：</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" />
<p style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px 0px 10px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">1.引入 jQuery 文件和 prettify.js 文件</p><pre class="prettyprint lang-html" style="overflow: auto; word-wrap: break-word; border-right-width: 0px; width: 613px;background: rgb(245,245,245); white-space: pre-wrap; border-bottom-width: 0px; word-spacing: 0px; text-transform: none; word-break: break-all; color: rgb(51,51,51); padding-bottom: 0.5em; padding-top: 0.5em; font: 18px/20px Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; padding-left: 0.5em; border-left: rgb(204,204,204) 3px solid; widows: 1; margin: 0px 0px 1em; letter-spacing: normal; padding-right: 0.5em; border-top-width: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px; border-radius: 4px">&lt;script src="http://libs.baidu.com/jquery/1.9.0/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="prettify.js"type="text/javascript"&gt;&lt;/script&gt;
&lt;link href="/prettify.css" type="text/css" rel="stylesheet" /&gt;</pre><span style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">2.调用 prettify.js 实现代码高亮</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">在 body 标签上添加调用方法，如下：</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><pre class="prettyprint lang-html" style="overflow: auto; word-wrap: break-word; border-right-width: 0px; width: 613px;background: rgb(245,245,245); white-space: pre-wrap; border-bottom-width: 0px; word-spacing: 0px; text-transform: none; word-break: break-all; color: rgb(51,51,51); padding-bottom: 0.5em; padding-top: 0.5em; font: 18px/20px Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; padding-left: 0.5em; border-left: rgb(204,204,204) 3px solid; widows: 1; margin: 0px 0px 1em; letter-spacing: normal; padding-right: 0.5em; border-top-width: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px; border-radius: 4px">&lt;body onload="prettyPrint()"&gt;
&lt;/body&gt;</pre><span style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">将你需要高亮显示的代码片断放在 pre标记里，如下：</span><span style="white-space: normal; word-spacing: 0px; text-transform: none; float: none; color: rgb(22,24,35); font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; widows: 1; display: inline !important; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px"></span><pre class="prettyprint lang-html" style="overflow: auto; word-wrap: break-word; border-right-width: 0px; width: 613px;background: rgb(247,247,247); white-space: pre-wrap; border-bottom-width: 0px; word-spacing: 0px; text-transform: none; word-break: break-all; color: rgb(22,24,35); padding-bottom: 0.5em; padding-top: 0.5em; font: 19px/25px Consolas, Monaco, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; padding-left: 0.5em; border-left: rgb(204,204,204) 3px solid; widows: 1; margin: 0px 0px 1em; letter-spacing: normal; padding-right: 0.5em; border-top-width: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px; border-radius: 4px">&lt;pre class="prettyprint"&gt;
    @*你的代码片断*@
&lt;/pre&gt;</pre><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(22,24,35); padding-bottom: 0px; padding-top: 0px; font: 14px/25px Arial, 微软雅黑, 'Hiragino Sans GB', sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">使用jQuery小技巧实现优化</span><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><br style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px" /><span style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(51,51,51); padding-bottom: 0px; padding-top: 0px; font: 16px/20px 微软雅黑, 'Helvetica Neue', Helvetica, Arial, sans-serif; padding-left: 0px; widows: 1; margin: 0px; letter-spacing: normal; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px">上述方法可以实现代码的高亮，但每次手动为pre标签添加"prettyprint"类，显示有些麻烦。<br style="padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-right: 0px" />使用下边的代码片断来解决这个问题并替换掉 body 的"onload"的事件，实现分离：<br style="padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-right: 0px" /><br style="padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-right: 0px" />$(window).load(function(){<br style="padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-right: 0px" />　　$("pre").addClass("prettyprint"); prettyPrint();<br style="padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-right: 0px" />})<br style="padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-right: 0px" /><br style="padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-right: 0px" />到这我们应该已经成功使用 prettify.js 实现了代码的高亮显示，为了提高页面加载速度，我们应该将引用的js文件放置在底部<br style="padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; padding-right: 0px" />下载地址：http://code.google.com/p/google-code-prettify/</span><img src ="http://www.blogjava.net/seoyouhua/aggbug/431743.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/seoyouhua/" target="_blank">V8微商网</a> 2016-09-05 20:21 <a href="http://www.blogjava.net/seoyouhua/archive/2016/09/05/431743.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>javascript事件查询综合</title><link>http://www.blogjava.net/seoyouhua/archive/2014/11/14/420088.html</link><dc:creator>V8微商网</dc:creator><author>V8微商网</author><pubDate>Fri, 14 Nov 2014 07:04:00 GMT</pubDate><guid>http://www.blogjava.net/seoyouhua/archive/2014/11/14/420088.html</guid><wfw:comment>http://www.blogjava.net/seoyouhua/comments/420088.html</wfw:comment><comments>http://www.blogjava.net/seoyouhua/archive/2014/11/14/420088.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/seoyouhua/comments/commentRss/420088.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/seoyouhua/services/trackbacks/420088.html</trackback:ping><description><![CDATA[<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">javascript事件查询综合click() 对象.click() 使对象被点击。closed 对象.closed 对象窗口是否已关闭true/falseclearTimeout(对象) 清除已设置的setTimeout对象clearInterval(对象) 清除已设置的setInterval对象confirm("提示信息") 弹出确认框，确定返回true取消返回falsecursor:样式 更改鼠标样式 hand crosshair text wait help default auto e/s/w/n-resize</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">event.clientX 返回最后一次点击鼠标X坐标值；event.clientY 返回最后一次点击鼠标Y坐标值；event.offsetX 返回当前鼠标悬停X坐标值event.offsetY 返回当前鼠标悬停Y坐标值</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">document.write(document.lastModified) 网页最后一次更新时间document.ondblclick=x 当双击鼠标产生事件document.onmousedown=x 单击鼠标键产生事件</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">document.body.scrollTop; 返回和设置当前竖向滚动条的坐标值，须与函数配合,document.body.scrollLeft; 返回和设置当前横向滚动务的坐标值，须与函数配合，document.title document.title="message"; 当前窗口的标题栏文字document.bgcolor document.bgcolor="颜色值"; 改变窗口背景颜色document.Fgcolor document.Fgcolor="颜色值"; 改变正文颜色document.linkcolor document.linkcolor="颜色值"; 改变超联接颜色document.alinkcolor document.alinkcolor="颜色值"; 改变正点击联接的颜色document.VlinkColor document.VlinkColor="颜色值"; 改变已访问联接的颜色document.forms.length 返回当前页form表单数document.anchors.length 返回当前页锚的数量document.links.length 返回当前页联接的数量document.onmousedown=x 单击鼠标触发事件document.ondblclick=x 双击鼠标触发事件defaultStatus window.status=defaultStatus; 将状态栏设置默认显示</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">function function xx(){...} 定义函数isNumeric 判断是否是数字innerHTML xx=对象.innerHTML 输入某对象标签中的html源代码innerText divid.innerText=xx 将以div定位以id命名的对象值设为XX</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">location.reload(); 使本页刷新，target可等于一个刷新的网页</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">Math.random() 随机涵数,只能是0到1之间的数,如果要得到其它数,可以为*10,再取整Math.floor(number) 将对象number转为整数，舍取所有小数Math.min(1,2) 返回1,2哪个小Math.max(1,2) 返回1,2哪个大</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">navigator.appName 返回当前浏览器名称navigator.appVersion 返回当前浏览器版本号navigator.appCodeName 返回当前浏览器代码名字navigator.userAgent 返回当前浏览器用户代标志</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">onsubmit onsubmit="return(xx())" 使用函数返回值opener opener.document.对象 控制原打开窗体对象</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">prompt xx=window.prompt("提示信息","预定值"); 输入语句parent parent.框架名.对象 控制框架页面</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">return return false 返回值random 随机参数（0至1之间）reset() form.reset(); 使form表单内的数据重置</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">split("") string.split("") 将string对象字符以逗号隔开submit() form对象.submit() 使form对象提交数据</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">String对象的 charAt(x)对象 反回指定对象的第多少位的字母 lastIndexOf("string") 从右到左询找指定字符，没有返回-1 indexOf("string") 从左到右询找指定字符，没有返回-1 LowerCase() 将对象全部转为小写 UpperCase() 将对象全部转为大写substring(0,5) string.substring(x,x) 返回对象中从0到5的字符setTimeout("function",time) 设置一个超时对象setInterval("function",time) 设置一个超时对象</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">toLocaleString() x.toLocaleString() 从x时间对象中获取时间，以字符串型式存在typeof(变量名) 检查变量的类型，值有：String,Boolean,Object,Function,Underfined</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">window.event.button==1/2/3 鼠标键左键等于1右键等于2两个键一起按为3window.screen.availWidth 返回当前屏幕宽度(空白空间)window.screen.availHeight 返回当前屏幕高度(空白空间)window.screen.width 返回当前屏幕宽度(分辨率值)window.screen.height 返回当前屏幕高度(分辨率值)window.document.body.offsetHeight; 返回当前网页高度window.document.body.offsetWidth; 返回当前网页宽度window.resizeTo(0,0) 将窗口设置宽高window.moveTo(0,0) 将窗口移到某位置window.focus() 使当前窗口获得焦点window.scroll(x,y) 窗口滚动条坐标，y控制上下移动，须与函数配合window.open() window.open("地址","名称","属性") 属性:toolbar(工具栏),location(地址栏),directions,status(状态栏), menubar(菜单栏),scrollbar(滚动条),resizable(改变大小), width(宽),height(高),fullscreen(全 屏),scrollbars(全屏时无滚动条无参 数,channelmode(宽屏),left(打开窗口x坐标),top(打开窗口y坐标) window.location = 'view-source:' + window.location.href 应用事件查看网页源代码;</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">a=new Date(); //创建a为一个新的时期对象y=a.getYear(); //y的值为从对象a中获取年份值 两位数年份y1=a.getFullYear(); //获取全年份数 四位数年份m=a.getMonth(); //获取月份值d=a.getDate(); //获取日期值d1=a.getDay(); //获取当前星期值h=a.getHours(); //获取当前小时数m1=a.getMinutes(); //获取当前分钟数s=a.getSeconds(); //获取当前秒钟数</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">对象.style.fontSize="文字大小";单位：mm/cm/in英寸/pc帕/pt点/px象素/em文字高1in=1.25cm1pc=12pt1pt=1.2px(800*600分辩率下)</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">文本字体属性： fontSize大小 family字体 color颜色 fontStyle风格，取值为normal一般,italic斜体,oblique斜体且加粗 fontWeight加粗,取值为100到900不等,900最粗,light,normal,bold letterSpacing间距,更改文字间距离,取值为,1pt,10px,1cm textDecoration:文字修饰;取值,none不修饰,underline下划线,overline上划线 background:文字背景颜色, backgroundImage:背景图片,取值为图片的插入路径</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">点击网页正文函数调用触发器：</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1.onClick 当对象被点击2.onLoad 当网页打开,只能书写在body中3.onUnload 当网页关闭或离开时,只能书写在body中4.onmouseover 当鼠标悬于其上时5.onmouseout 当鼠标离开对象时6.onmouseup 当鼠标松开7.onmousedown 当鼠标按下键8.onFocus 当对象获取焦点时9.onSelect 当对象的文本被选中时10.onChange 当对象的内容被改变11.onBlur 当对象失去焦点onsubmit=return(ss())表单调用时返回的值</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">直线 border-bottom:1x solid black虚线 border-bottom:1x dotted black点划线 border-bottom:2x dashed black双线 border-bottom:5x double black槽状 border-bottom:1x groove black脊状 border-bottom:1x ridge black</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">1.边缘高光glow(color=颜色,strength=亮光大小)<br />2.水平翻转fliph() 使对象水平翻转180度<br />3.垂直翻转flipv() 使对象垂直翻转180度<br />4.对象模糊blur(add=true/false direction=方向 strength=强度) add指定是否按印象画派进行模糊direction模糊方向strength模糊强度5.对象透明alpha(opaction=0-100,finishopacity=0-100,style=0/1/2/3) opaction对象整体不透明值finishopacity当对象利用了渐透明时该项指定结束透明位置的不透明值style指定透明方式0为整体透明，1为线型透明，2为圆型透明，3为矩形透明6.去除颜色chroma(color=颜色值)使对象中颜色与指定颜色相同区域透明7.建立阴影dropshadow(color=阴影颜色,offx=水平向左偏离像素,offy=水平向下偏离像素)8.去色gray()使对象呈灰度显示9.负片效果invert()使对象呈底片效果10.高光light()使对象呈黑色显示11.遮盖mask(color=颜色)使整个对象以指定颜色进行蒙板一次</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">opacity 表透明度水平.0~100,0表全透明,100表完全不透明finishopacity表想要设置的渐变透明效果.0~100.style 表透明区的形状.0表统一形状.1表线形.2表放射形.3表长方形.startx.starty表渐变透明效果的开始时X和Y坐标.finishx,finishy渐变透明效果结束时x,y 的坐标.add有来确定是否在模糊效果中使有原有目标.值为0,1.0表"否",1表"是".direction设置模糊的方向.0度表垂直向上,45度为一个单位.默认值是向左270度.left,right,down,up.strength 只能用整数来确定.代表有多少个像素的宽度将受到模糊影响.默认是5个.color要透明的颜色.offx,offy分别是x,y 方向阴影的偏移量.positive指投影方式.0表透明像素生成阴影.1表只给出不透明像素生成阴影..</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">AddAmbient:加入包围的光源.AddCone:加入锥形光源.AddPoint加入点光源Changcolor:改变光的颜色．Changstrength:改变光源的强度．Clear:清除所有的光源．MoveLight:移动光源．</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">freq是波纹的频率，在指定在对象上一区需要产生多少个完事的波纹．lightstrength可对于波纹增强光影的效果．显著0~100正整数，正弦波开始位置是0~360度．0表从0度开始，25表从90度开始．strength表振幅大小．</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">hand style="cursor:hand"crosshair style="cursor:crosshair"text style="cursor:text"wait style="cursor:wait"default style="cursor:default" help style="cursor:help"e-resize style="cursor:e-resize"ne-resize style="cursor:ne-resize"n-resize style="cursor:n-resize"nw-resize style="cursor:nw-resize"w-resize style="cursor:w-resize"s-resize style="cursor:s-resize"sw-resize style="cursor:sw-resize "se-resize style="cursor:se-resize"auto style="cursor:auto"</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">--&gt;</p><img src ="http://www.blogjava.net/seoyouhua/aggbug/420088.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/seoyouhua/" target="_blank">V8微商网</a> 2014-11-14 15:04 <a href="http://www.blogjava.net/seoyouhua/archive/2014/11/14/420088.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>介绍一些 Java NIO 的学习文章,以方便各位的学习!</title><link>http://www.blogjava.net/seoyouhua/archive/2014/11/14/420089.html</link><dc:creator>V8微商网</dc:creator><author>V8微商网</author><pubDate>Fri, 14 Nov 2014 07:04:00 GMT</pubDate><guid>http://www.blogjava.net/seoyouhua/archive/2014/11/14/420089.html</guid><wfw:comment>http://www.blogjava.net/seoyouhua/comments/420089.html</wfw:comment><comments>http://www.blogjava.net/seoyouhua/archive/2014/11/14/420089.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/seoyouhua/comments/commentRss/420089.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/seoyouhua/services/trackbacks/420089.html</trackback:ping><description><![CDATA[<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">NIO 入门: http://www-900.ibm.com/developerWorks/cn/cnonlinetutorial.nsf/gethtml?OpenAgent&amp;url=/developerWorks/cn/education/java/j-nio/tutorial/index.html</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">Java NIO原理和使用 : http://www.jdon.com/concurrent/nio%D4%AD%C0%ED%D3%A6%D3%C3.htm</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">Merlin 给 Java 平台带来了非阻塞 I/O :</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">http://www-900.ibm.com/developerWorks/cn/java/j-javaio/index.shtml</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">Java NIO API详解 : http://blog.csdn.net/daijialin/archive/2004/12/27/231384.aspx</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">Java New I/O的使用 : http://dev.csdn.net/develop/article/22/22063.shtm</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">最后推荐一本书籍: Java NIO</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">相信有了这些网络资料,你的Java NIO的基础一定可以得到提高!</p><img src ="http://www.blogjava.net/seoyouhua/aggbug/420089.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/seoyouhua/" target="_blank">V8微商网</a> 2014-11-14 15:04 <a href="http://www.blogjava.net/seoyouhua/archive/2014/11/14/420089.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>读取foxpro格式的dbf文件</title><link>http://www.blogjava.net/seoyouhua/archive/2014/11/14/420086.html</link><dc:creator>V8微商网</dc:creator><author>V8微商网</author><pubDate>Fri, 14 Nov 2014 07:03:00 GMT</pubDate><guid>http://www.blogjava.net/seoyouhua/archive/2014/11/14/420086.html</guid><wfw:comment>http://www.blogjava.net/seoyouhua/comments/420086.html</wfw:comment><comments>http://www.blogjava.net/seoyouhua/archive/2014/11/14/420086.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/seoyouhua/comments/commentRss/420086.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/seoyouhua/services/trackbacks/420086.html</trackback:ping><description><![CDATA[<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">原文出处</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">终于整理完dbf文件读写的java源码，欢迎使用</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">修改以下代码</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">private void init(InputStream inputstream) throws JDBFException { try { stream = new DataInputStream(inputstream); int i = readHeader(); fields = new JDBField[i]; int j = 1; for(int k = 0; k &lt; i; k++) { fields[k] = readFieldHeader(); j += fields[k].getLength(); }</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">if(stream.read() &lt; 1) throw new JDBFException("Unexpected end of file reached."); nextRecord = new byte[j]; try { //stream.readFully(nextRecord); stream.read(new byte[263]); stream.readFully(nextRecord); } catch(EOFException eofexception) { nextRecord = null; stream.close(); } } catch(IOException ioexception) { throw new JDBFException(ioexception); } }</p>
<p style="border-bottom: 0px; text-align: left; border-left: 0px; padding-bottom: 0px; text-transform: none; background-color: rgb(255,255,255); list-style-type: none; text-indent: 0px; margin: 20px 0px 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/25px 宋体; white-space: normal; color: rgb(51,51,51); border-top: 0px; border-right: 0px; word-spacing: 0px; padding-top: 0px; -webkit-text-stroke-width: 0px">private int readHeader() throws IOException, JDBFException { byte abyte0[] = new byte[16]; try { stream.readFully(abyte0); } catch(EOFException eofexception) { throw new JDBFException("Unexpected end of file reached."); } int i = abyte0[8]; if(i &lt; 0) i += 256; i += 256 * abyte0[9]; i -= 264; i = --i / 32; //i = --i / 32; //i--; try { stream.readFully(abyte0); } catch(EOFException eofexception1) { throw new JDBFException("Unexpected end of file reached."); } return i; }</p><img src ="http://www.blogjava.net/seoyouhua/aggbug/420086.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/seoyouhua/" target="_blank">V8微商网</a> 2014-11-14 15:03 <a href="http://www.blogjava.net/seoyouhua/archive/2014/11/14/420086.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>