java.util.regex.Matcher m = p.matcher("12.E+3");
boolean result = m.matches();//
190.给下拉框分组
<SELECT>
<OPTGROUP LABEL="碱性金属">
<OPTION>锂 (Li)</OPTION>
<OPTION>纳 (Na)</OPTION>
<OPTION>钾 (K)</OPTION>
</OPTGROUP>
<OPTGROUP LABEL="卤素">
<OPTION>氟 (F)</OPTION>
<OPTION>氯 (Cl)</OPTION>
<OPTION>溴 (Br)</OPTION>
</OPTGROUP>
</SELECT>//
191.加注音
<RUBY>
基准文本
<RT>注音文本
</RUBY>//
192.加删除线
<S>此文本将带删除线显示。</S>//
193.取frame中的event事件
document.frames("workspace").event.keyCode//
194.是弹出方法的定义
String.prototype.trim=function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
alert(" ".trim)//
195.防止网页被包含
if (window != window.top)
top.location.href = location.href;//
196.让网页一直在frame里面
if(window==window.top)
{
document.body.innerHTML="<center><h1>请通过正常方式访问本页面!</h1></center>";
//window.close();
}//
197.加为首页
<SCRIPT>
function fnSet(){
oHomePage.setHomePage(location.href);
event.returnValue = false;
}
</SCRIPT>
<IE:HOMEPAGE ID="oHomePage" style="behavior:url(#default#homepage)"/>//
198.xml数据岛操作
<HTML>
<HEAD><Title>HTML中的数据岛中的记录集</Title></HEAD>
<body bkcolor=#EEEEEE text=blue bgcolor="#00FFFF">
<Table align=center width="100%"><TR><TD align="center">
<h5><b><font size="4" color="#FF0000">HTML中的XML数据岛记录编辑与添加 </font></b></h5>
</TD></TR></Table>
<HR>
酒店名称:<input type=text datasrc=#theXMLisland DataFLD=NAME size="76"><BR>
地址:<input type=text datasrc=#theXMLisland DataFLD=Address size="76"><BR>
主页:<input type=text datasrc=#theXMLisland DataFLD=HomePage size="76"><BR>
电子邮件:<input type=text datasrc=#theXMLisland DataFLD=E-Mail size="76"><BR>
电话:<input type=text datasrc=#theXMLisland DataFLD=TelePhone size="76"><BR>
级别:<input type=text datasrc=#theXMLisland DataFLD=Grade size="76"><HR>
<input id="first" TYPE=button value="<< 第一条记录" onclick="theXMLisland.recordset.moveFirst()">
<input id="prev" TYPE=button value="<上一条记录" onclick="theXMLisland.recordset.movePrevious()">
<input id="next" TYPE=button value="下一条记录>" onclick="theXMLisland.recordset.moveNext()">
<input id="last" TYPE=button value="最后一条记录>>" onclick="theXMLisland.recordset.moveLast()">
<input id="Add" TYPE=button value="添加新记录" onclick="theXMLisland.recordset.addNew()">
<XML ID="theXMLisland">
<HotelList>
<Hotel>
<Name>四海大酒店</Name>
<Address>海魂路1号</Address>
<HomePage>www.sihaohotel.com.cn</HomePage>
<E-Mail>master@sihaohotel.com.cn</E-Mail>
<TelePhone>(0989)8888888</TelePhone>
<Grade>五星级</Grade>
</Hotel>
<Hotel>
<Name>五湖宾馆</Name>
<Address>东平路99号</Address>
<HomePage>www.wuhu.com.cn</HomePage>
<E-Mail>web@wuhu.com.cn</E-Mail>
<TelePhone>(0979)1111666</TelePhone>
<Grade>四星级</Grade>
</Hotel>
<Hotel>
<Name>“大沙漠”宾馆</Name>
<Address>留香路168号</Address>
<HomePage>www.dashamohotel.com.cn</HomePage>
<E-Mail>master@dashamohotel.com.cn</E-Mail>
<TelePhone>(0989)87878788</TelePhone>
<Grade>五星级</Grade>
</Hotel>
<Hotel>
<Name>“画眉鸟”大酒店</Name>
<Address>血海飘香路2号</Address>
<HomePage>www.throstlehotel.com.cn</HomePage>
<E-Mail>chuliuxiang@throstlehotel.com.cn</E-Mail>
<TelePhone>(099)9886666</TelePhone>
<Grade>五星级</Grade>
</Hotel>
</HotelList>
</XML>
</body>
</HTML> //xml数据岛中添加记录
-------------------------------
The following list is a sample of the properties and methods that you use to access nodes in an XML
document.
Property/ Method Description
XMLDocument Returns a reference to the XML Document Object Model (DOM) exposed by the object.
documentElement Returns the document root of the XML document.
来源:www.upschool.com.cn
作者:未知
关键字:JS,javascript,教程,正则,特效
发表日期:2007-2-10 12:53:00
网页显示有限 阅读全文请下载本文完整版WORD文档
上一篇:预载Gif的2个JS代码(非常有用) 下一篇:
共17页
9 7 [
1] [
2] [
3] [
4] [
5] [
6] [
7] [
8] [
9] [
10] [
11] [
12] [
13] [
14] [
15] [
16] [
17]
8 :>
2008-11-22 5:47:33