??xml version="1.0" encoding="utf-8" standalone="yes"?>色视频一区二区,中文字幕第一区二区,久久精品国产久精国产爱http://www.aygfsteel.com/kxbin/category/49739.html创出一片天?/description>zh-cnWed, 21 Mar 2012 22:08:14 GMTWed, 21 Mar 2012 22:08:14 GMT60href="#"与href="javascript:void(0)"的区??http://www.aygfsteel.com/kxbin/articles/371084.htmlkxbinkxbinThu, 01 Mar 2012 07:58:00 GMThttp://www.aygfsteel.com/kxbin/articles/371084.htmlhttp://www.aygfsteel.com/kxbin/comments/371084.htmlhttp://www.aygfsteel.com/kxbin/articles/371084.html#Feedback0http://www.aygfsteel.com/kxbin/comments/commentRss/371084.htmlhttp://www.aygfsteel.com/kxbin/services/trackbacks/371084.htmlQ?包含了一个位|信?/p>

默认的锚Ҏ(gu)Qtop 也就是网늚上端
而javascript:void(0) 仅仅表示一个死链接
q就是ؓ什么有的时候页面很长浏览链接明明是Q可是蟩动到了页?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />而Javascript:void(0) 则不是如?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />所以调用脚本的时候最好用void(0)
或?lt;input onclick>
<div onclick>{?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />打开新窗口链接的几种办法
1.window.open('url')
2.用自定义函数
        <script>
        function openWin(tag,obj)
        {
            obj.target="_blank";
            obj.href = "Web/Substation/Substation.aspx?stationno="+tag;
            obj.click();
        }
        </script>
<a href="javascript:void(0)" onclick="openWin(3,this)">LINK_TEST</a>
window.location.href=""
-------------------------------------------------------------------------------
如果是个# Q就会出现蟩到顶部的情况,个h收藏的几U解x法:
1Q?lt;a href="####"></a>
2Q?lt;a href="javascript:void(0)"></a>
3Q?lt;a href="javascript:void(null)"></a>
4Q?lt;a href="#" onclick="return false"></a>
5Q?lt;span style="cursor:hand"></span>(好像在FF中不能显C?
-------------------------------------------------------------------------------
慎用JavaScript:void(0)
今天调试CGI的时候,明明CGIE序已经执行Qƈ且最后结果也是正的Q但是页面就是不h。在Firefox2.0下测试,l果却是正常的,IE6却偏偏不hQ仔l调查了一下,发现cgi面链接的是 <a href="javaScript:void(0)" OnClick="XXX_Func();" ….> only a sample </a>,问题出在这个void(0)?让我们先来看看JavaScript中void(0)的含?
JavaScript中void是一个操作符Q该操作W指定要计算一个表辑ּ但是不返回倹{?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />void 操作W用法格式如下:
1. javascript:void (exPRession)
2. javascript:void expression
expression是一个要计算?JavaScript 标准的表辑ּ。表辑ּ外侧的圆括号是可选的Q但是写上去是一个好?fn)惯。我们可以?void 操作W指定超U链接。表辑ּ会被计算但是不会在当前文档处装入M内容。面的代码创Z一个超U链接,当用L(fng)M后不会发生Q何事。当用户点击链接Ӟvoid(0) 计算?0Q但?JavaScript 上没有Q何效果?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><a href="javascript:void(0)">单击此处什么也不会发生</a>
也就是说Q要执行某些处理Q但是不整体h面的情况下Q可以用void(0),但是在需要对面q行refresh的情况下Q那p仔细了?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />其实我们可以q样?lt;a href="javascript:void(document.form.submit())">Q这句话会进行一ơsubmit操作。那什么情况下用void(0)比较多呢Q无hQ当然是Ajax了,看一下Ajax的web面的话Q一般都会看到有很多的void(0)Q:Q Q所以在使用void(0)之前,最好先想一?q个面是否需要整体刷新?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />----------------------------------

Z么location.href不自动蟩转?慎用javascript:void(0)

<a href="javascript:void(0)" onclick="delete('123')">删除</a>
<script>
function delete(id) {
   if(confirm("实要删除[Z么location.href不自动蟩转?]吗?")) {
       location.href="/delete.jsp?id=" + id;
   }
}
以上代码不管如何查都没有M问题Q而location.href="/delete.jsp?id=" + id;在别的地斚w好Qؓ什么这D代码就行呢Q?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />原因是那个void(0)Q把代码Ҏ(gu)Q?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><a href="javascript:delete('123')">删除</a>
<script>
function delete(id) {
   if(confirm("实要删除[Z么location.href不自动蟩转?]吗?")) {
       location.href="/delete.jsp?id=" + id;
   }
}
我们发现Q页面立卛_跌{了,能正常删除相应的数据?/p>

void是一个操作符Q会计算一个表辑ּQ但不会q回|当然也不会改变当前页面的M内容Q也׃会正常的跌{



kxbin 2012-03-01 15:58 发表评论
]]>
动态添加新行(在javascriptQ通过触发事gd新行Q?/title><link>http://www.aygfsteel.com/kxbin/articles/370896.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Tue, 28 Feb 2012 01:41:00 GMT</pubDate><guid>http://www.aygfsteel.com/kxbin/articles/370896.html</guid><wfw:comment>http://www.aygfsteel.com/kxbin/comments/370896.html</wfw:comment><comments>http://www.aygfsteel.com/kxbin/articles/370896.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/kxbin/comments/commentRss/370896.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/kxbin/services/trackbacks/370896.html</trackback:ping><description><![CDATA[<div><html></div><div><head></div><div><span style="white-space:pre"> </span><script></div><div><span style="white-space:pre"> </span>function test(){</div><div><span style="white-space:pre"> </span>var ls_t =   window.document.all("table1"); //获得id为talbe1的对?/div><div><span style="white-space:pre"> </span>var trIndex = window.document.all("tr1");</div><div><span style="white-space:pre"> </span>maxcell=ls_t.rows(0).cells.length;</div><div><span style="white-space:pre"> </span>mynewrow = ls_t.insertRow();  //d新行</div><div><span style="white-space:pre"> </span>if(!trIndex.value) {</div><div><span style="white-space:pre"> </span>trIndex.value = 0;</div><div><span style="white-space:pre"> </span>}</div><div>            trIndex.value = parseInt(trIndex.value) + 1;</div><div><span style="white-space:pre"> </span>mynewrow.setAttribute("id","tr" + trIndex.value); //d一个变量ؓid</div><div><span style="white-space:pre"> </span>mynewcell=mynewrow.insertCell();   //d新列</div><div><span style="white-space:pre"> </span>mynewcell.setAttribute("align","center");</div><div><span style="white-space:pre"> </span>mynewcell.innerHTML="1";</div><div><span style="white-space:pre"> </span>mynewcell=mynewrow.insertCell(); </div><div><span style="white-space:pre"> </span>mynewcell.setAttribute("align","center");</div><div><span style="white-space:pre"> </span>mynewcell.innerHTML="test";</div><div><span style="white-space:pre"> </span>mynewcell=mynewrow.insertCell(); </div><div><span style="white-space:pre"> </span>mynewcell.setAttribute("align","center");</div><div><span style="white-space:pre"> </span>mynewcell.innerHTML="25";</div><div><span style="white-space:pre"> </span></div><div><span style="white-space:pre"> </span>}</div><div><span style="white-space:pre"> </span></script></div><div></head></div><div><body></div><div><span style="white-space:pre"> </span><a href="javascript:test()">d新行新列</a></div><div><span style="white-space:pre"> </span><table id="table1" border="1"></div><div><span style="white-space:pre"> </span><tr id="tr1"></div><div><span style="white-space:pre"> </span><td>序号</td></div><div><span style="white-space:pre"> </span><td>姓名</td></div><div><span style="white-space:pre"> </span><td>q龄</td></div><div><span style="white-space:pre"> </span></tr></div><div><span style="white-space:pre"> </span></table></div><div></body></div><div></html></div><img src ="http://www.aygfsteel.com/kxbin/aggbug/370896.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/kxbin/" target="_blank">kxbin</a> 2012-02-28 09:41 <a href="http://www.aygfsteel.com/kxbin/articles/370896.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JavaScript实现面跌{的几U方?/title><link>http://www.aygfsteel.com/kxbin/articles/366418.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Thu, 15 Dec 2011 03:57:00 GMT</pubDate><guid>http://www.aygfsteel.com/kxbin/articles/366418.html</guid><wfw:comment>http://www.aygfsteel.com/kxbin/comments/366418.html</wfw:comment><comments>http://www.aygfsteel.com/kxbin/articles/366418.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/kxbin/comments/commentRss/366418.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/kxbin/services/trackbacks/366418.html</trackback:ping><description><![CDATA[<div><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">W一U:</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">    <script language="javascript"></p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">           window.location.href="index.<a target="_blank" style="color: #333333; text-decoration: none; font-size: 14px; ">php</a>"; </p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">            //比较常用的方法,没什么可解释的,后面直接跟指定要跌{的地斏V?/p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">    </script></p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">W二U:</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">    <script language="javascript"></p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">alert("q回");</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">window.history.back(-1);</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">        //cM于按钮,参数是负几,后退几次?/p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">   </script></p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">W三U:</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">   <script language="javascript"></p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">window.navigate("index.<a target="_blank" style="color: #333333; text-decoration: none; font-size: 14px; ">jsp</a>");</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">        //navigate对象包含有关<a target="_blank" style="color: #333333; text-decoration: none; font-size: 14px; ">览?/a>的信息,也可以作为页面蟩转,后面直接加要跌{的地斏V?/p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">       //没有应用?navigator 对象的公开标准Q不q所有浏览器都支持该对象?nbsp; </p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">    </script></p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">W四U:</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">   <script language="JavaScript"></p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">          self.location.href=index.htm;</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">          //self指代当前H口对象,属于window最上层的对?</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">          //location.href 指的是某window对象的URL地址.</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">         //self.location.href指当前窗口的URL地址,Lself默认为当前窗口的URL地址.</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">   </script></p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">W五U:</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">   <script language="javascript"></p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">          alert("非法讉KQ?);</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">          top.location=index.jsp;</p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">           //top 属性返回最层的先辈窗口?/p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">           //该属性返回队一个顶U窗口的只读引用?/p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">           //如果H口本n是一个顶U窗口,top 属性存攑֯H口自n的引用?/p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">          //如果H口是一个框Ӟ那么 top 属性引用包含框架的层H口?/p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; ">    </script></p><p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; border-right-width: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; color: #333333; font-family: 宋体; font-size: 14px; line-height: 28px; background-color: #ffffff; "> </p></div><img src ="http://www.aygfsteel.com/kxbin/aggbug/366418.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/kxbin/" target="_blank">kxbin</a> 2011-12-15 11:57 <a href="http://www.aygfsteel.com/kxbin/articles/366418.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在javascript中将GBK转UTF-8http://www.aygfsteel.com/kxbin/articles/366349.htmlkxbinkxbinWed, 14 Dec 2011 08:26:00 GMThttp://www.aygfsteel.com/kxbin/articles/366349.htmlhttp://www.aygfsteel.com/kxbin/comments/366349.htmlhttp://www.aygfsteel.com/kxbin/articles/366349.html#Feedback0http://www.aygfsteel.com/kxbin/comments/commentRss/366349.htmlhttp://www.aygfsteel.com/kxbin/services/trackbacks/366349.html
GBK~码转化为UTF-8
<script type="text/javascript">  
var easyUTF8 = function(gbk){  
    if(!gbk){return '';}  
    var utf8 = [];  
    for(var i=0;i<gbk.length;i++){  
        var s_str = gbk.charAt(i);  
        if(!(/^%u/i.test(escape(s_str)))){utf8.push(s_str);continue;}  
        var s_char = gbk.charCodeAt(i);  
        var b_char = s_char.toString(2).split('');  
        var c_char = (b_char.length==15)?[0].concat(b_char):b_char;  
        var a_b =[];  
        a_b[0] = '1110'+c_char.splice(0,4).join('');  
        a_b[1] = '10'+c_char.splice(0,6).join('');  
        a_b[2] = '10'+c_char.splice(0,6).join('');  
        for(var n=0;n<a_b.length;n++){  
            utf8.push('%'+parseInt(a_b[n],2).toString(16).toUpperCase());  
        }  
    }  
    return utf8.join('');  
};  
document.write(easyUTF8('我爱北京天安门!'));  
</script>  


kxbin 2011-12-14 16:26 发表评论
]]>
JS?wi)Ş菜?/title><link>http://www.aygfsteel.com/kxbin/articles/360039.html</link><dc:creator>kxbin</dc:creator><author>kxbin</author><pubDate>Wed, 05 Oct 2011 10:12:00 GMT</pubDate><guid>http://www.aygfsteel.com/kxbin/articles/360039.html</guid><wfw:comment>http://www.aygfsteel.com/kxbin/comments/360039.html</wfw:comment><comments>http://www.aygfsteel.com/kxbin/articles/360039.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/kxbin/comments/commentRss/360039.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/kxbin/services/trackbacks/360039.html</trackback:ping><description><![CDATA[<div style="margin: 0px 0px 15px" class="blog_title"> <h3 style="padding-bottom: 0px; line-height: 1.5em; margin: 0px 0px 0.5em; padding-left: 0px; padding-right: 0px; color: black; font-size: 16px; padding-top: 10px">JSҎ(gu)代码大全Q七Q超全的JS?wi)Ş菜单׃n</h3><strong>标签: <a style="color: #006600; text-decoration: underline" >?wi)Ş菜?/a> <a style="color: #006600; text-decoration: underline" >Ҏ(gu)代码</a> <a style="color: #006600; text-decoration: underline" >js</a> <a style="color: #006600; text-decoration: underline" >源代?/a> <a style="color: #006600; text-decoration: underline" >下蝲</a></strong> </div> <div style="line-height: 26px; font-size: 14px" class="blog_content"> <p>JS?wi)Ş菜单是很常用?a style="color: #006600; text-decoration: underline" target="_blank">JSҎ(gu)代码</a>Q常用在理软g当中Q但是一套树(wi)形菜单已l不能满需求,所以如果能有一套比较全面的?wi)Ş菜单JSҎ(gu)代码Q将会非常方便,下面懒h萱将全的JS?wi)Ş菜单QdhtmlxTreeQ共享出来,怿你一定用得上?/p> <p> 全的JS?wi)Ş菜单׃n一共包括八U,下面׃一介绍Q?/p> <p><strong>1、不同表现方式的JS?wi)Ş菜?/strong>Q如图所C)</p> <p><img style="vertical-align: top" alt="不同表现方式的JS?wi)Ş菜? src="http://www.oecp.cn/userfiles/image/2009-09/5abf61e216c2446a8f3d521fc4dfa0f2.gif" width="626" height="215" /></p> <p><strong>2、复选框式的JS?wi)Ş菜?/strong>Q如图所C)</p> <p>左图为只可以选择单节点,叛_为在选择子节点的同时选择父节?/p> <p><img style="vertical-align: top" alt="复选框式的JS?wi)Ş菜? src="http://www.oecp.cn/userfiles/image/2009-09/d39d3bbe76214c5ea913595daffccff6.gif" width="481" height="201" /></p> <p>3?strong>可以重新排列节点q且h拖放功能的js?wi)Ş菜?/strong>Q如图所C)</p> <p> <img style="vertical-align: top" alt="可以重新排列节点q且h拖放功能的js?wi)Ş菜? src="http://www.oecp.cn/userfiles/image/2009-09/858bc9d4b087444b8b787a500eb901d8.gif" width="232" height="344" /></p> <p>4?strong>带有提示框的js?wi)Ş菜?/strong>Q如图所C)</p> <p>  如果x开或关闭某个节点,会弹出一个警告框Q如果选中或取消某个菜单前的复选框Q也会有相应的文字提C。这个功能目前还没有惛_会在什么情况下使用Q但是可以先了解一下?/p> <p> <img style="vertical-align: top" alt="带有提示框的js?wi)Ş菜? src="http://www.oecp.cn/userfiles/image/2009-09/0f2c69b563d6491188e5e5a535f47f24.gif" width="576" height="219" /></p> <p>5?strong>div菜单列表转换成树(wi)的js?wi)Ş菜?/strong>Q如图所C)</p> <p>  左图为div菜单列表Q右图ؓ转换后的?wi)?/p> <p><img style="vertical-align: top" alt="div菜单列表转换成树(wi)的js?wi)Ş菜? src="http://www.oecp.cn/userfiles/image/2009-09/eb42d1b8f0cc4506b16744c85c592e94.gif" width="504" height="118" /></p> <p>6?strong>可以异步加蝲数据的js?wi)Ş菜?/strong></p> <p>7?strong>可以d和删除菜单的js?wi)Ş菜?/strong>Q如图所C)</p> <p>     包括d子菜单和同菜单两种?/p> <p><img style="vertical-align: top" alt="可以d和删除菜单的js?wi)Ş菜? src="http://www.oecp.cn/userfiles/image/2009-09/6e8a7466a9d14fd285df432792ea1485.gif" width="588" height="219" /></p> <p>8?strong>展开关闭节点的js?wi)Ş菜?/strong>Q如图所C)</p> <p><img style="vertical-align: top" alt="展开关闭节点的js?wi)Ş菜? src="http://www.oecp.cn/userfiles/image/2009-09/f7c73f128fc044f5838fd7b2bd676fc9.gif" width="401" height="218" /></p> <p>所有的JS?wi)Ş菜单源文件在附g下蝲Q里面有以上全部的实例源代码Q还有很详细的功能描q及参数讄Q不q都是英文的Q本语很差大家还是自q译吧Q呵呵!</p> <p>此JS?wi)Ş菜单已做q测试,可以兼容现在的所有主浏览器Q所以你可以攑ֿ使用q个JS?wi)Ş菜单?/p> <p>里边的功能很多,可能大家暂时不会都用刎ͼ但是说不定以后会用到呢,所以要好好收藏哦!</p> <p>好了QJSҎ(gu)代码大全Q七Q超全的JS?wi)Ş菜单׃np么多了,懒h׃前还有很多其他JSҎ(gu)代码文章Q也可以下蝲下来收藏Q以后一定有用到的地方,如果其中有什么问题可以留al?a style="color: #006600; text-decoration: underline" target="_blank">懒h?/a>Q尽量给你满意的{复Q?/p> <p> </p> <p>来自Q?a ><font color="#108ac6">http://www.oecp.cn/hi/xuan/blog/392</font></a></p></div> <img src ="http://www.aygfsteel.com/kxbin/aggbug/360039.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/kxbin/" target="_blank">kxbin</a> 2011-10-05 18:12 <a href="http://www.aygfsteel.com/kxbin/articles/360039.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ƽ½</a>| <a href="http://" target="_blank">ԭ</a>| <a href="http://" target="_blank">ƾ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʡ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ٽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ԫ</a>| <a href="http://" target="_blank">ܿ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ګ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ƽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɰ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">⳵</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>