Oracle两表关联(join)更新字段值一张表到另一张表
2016-01-10 20:54
781 查看
二、导航功能增强
1. 下拉菜单中的链接(Links in Select Menu)
Q:我如何实现在下拉菜单中链接到不同的页面?
A:要创建一个所示的下拉菜单:选择一个页面
JavaScript FAQ
Numbers
Strings
Navigation
Colors
JavaScripter.net
你可以使用下面的代码:
<form>
<select
onChange="if(this.selectedIndex!=0)
self.location=this.options[this.selectedIndex].value">
<optionvalue=""selected>Selectapage
<optionvalue="startpag.htm">JavaScriptFAQ
<optionvalue="numbers.htm">Numbers
<optionvalue="strings.htm">Strings
<optionvalue="navigati.htm">Navigation
<optionvalue="colors.htm">Colors
<optionvalue="http://www.javascripter.net">JavaScripter.net
</select>
</form>
只需要把菜单项及其相应的URL改为你需要就可以了。你可以使用绝对地址(就像http://www.javascripter.net),也可以使用相对地址(像 mypage.htm)。
2. 按钮链接(Button Links)
Q:我怎么才能把一个按钮变为指向另外一个页面的超链接呢?
A:要创建一个按钮就像一个:
你可以使用这段代码:
<form>
<inputtype=button
value="insertbuttontexthere"
onClick="self.location='Your_URL_here.htm'">
</form>
只需要改为你需要的按钮文本和目标地址。试一下这个:
你可以使用绝对地址(像http://www.javascripter.net)也可以使用相对地址(像mypage.htm)。
3. 后退按钮(Back Button)
Q:我能让按钮像浏览器的“后退”按钮一样吗?
A:要创建你自己的后退按钮,可以使用这段代码:
<form>
<inputtype=buttonvalue="Back"
onCLick="history.back()">
</form>
现在试一下:
4. 前进按钮(Forward Button)
Q:我能让按钮像浏览器中的“前进”按钮一样吗?
A:要创建自己的“前进”按钮,使用这段代码:
<form>
<inputtype=buttonvalue="Forward"
onCLick="history.forward()">
</form>
如果浏览器上的前进按钮当前不可用,那么这个“前进”按钮同样不能工作。这种情况就是当前页是你浏览历史中的最后一页。换句话说,如果你是使用浏览器的“后退”按钮到达的这个页面(或者脚本编写的后退按钮),那么这个前进按钮就可以工作。现在试一下吧!
5. 查询字符串(Query Stirngs)
Q:我的脚步可以访问当前URL中的查询字符串吗?
A:查询字符串(或搜索字符串)是URL中的一个可选部分,它跟在文件名后面,以问号引导(?)。例如,下面的URL在HTML文件名后包含了一个查询字符串 ?myquery:
http://www.myfirm.com/file.html?myquery
你的脚本可以使用JavaScript的location.search属性访问当前URL中的查询字符按。点击下面按钮试一下看看!(为了查看地址中的URL,你可能想要在顶层浏览器窗口中显示这个页面。)
创建这些按钮的代码是:
<form>
<inputtype=buttonvalue="Addquery?test"
onClick="selfself.location=
self.location.protocol+'//'
+self.location.host
+self.location.pathname+'?test'">
<inputtype=buttonvalue="Showquery"
onClick="alert('Querystring:'+self.location.search)">
<inputtype=buttonvalue="Removequery"
onClick="selfself.location=
self.location.protocol+'//'
+self.location.host
+self.location.pathname">
</form>
注意:查询字符串有时候可能不会如预期一样的工作。例如,如果你将这个页面保存本地磁盘上,上面在Internet Explorer 4.x就不会工作(但是在Netscape Navigator中依然有效)。
6. 向页面传递参数(Passing parameters to a page)
Q:我可以从也页面向另外一个页面传递参数吗?
A:可以。有几种不同的方式可以实现:
把参数保存在cookie中
把参数保存在另外一个窗口或框架的变量中
把参数存在可以修改的属性top.name(浏览器窗口的名字)中
把参数作为一个查询字符串拼接在目标页面的URL后面
这里是一个简单的例子来演示所有这些传递参数的方法。传递的值应该是字符换“It_worked”。当你点击下面的按钮时,按钮的事件脚本会存在这些值(1)在名为parm_value的cookie中,(2)以顶层变量top.parm_value保存以及(3)在top.name属性中。然后,脚本引导浏览器到parm_get.htm,它的URL包含一个值为URL编码的查询字符串。
7. 查找文本(Searching for text)
Q:我怎样在页面查询一个特定的文本字符串?
A:在Netscape Navigator 4.x中,可以使用window.find(string) 方法查找;参见查找对话框。在Internet Explorer 4.x或更新版本中,创建一个文本范围对象(下面的例子中是TRang),然后使用TRang.findText(string)。
示例:下面的脚本根据用户输入的文本查找并在页面上高亮显示。
这个示例的代码为:
<formname="f1"action=""
onSubmit="if(this.t1.value!=null&&this.t1.value!='')
findString(this.t1.value);returnfalse"
>
<inputtype="text"name=t1value=""size=20>
<inputtype="submit"name=b1value="Find">
</form>
<scriptlanguage="JavaScript">
<!--
varTRange=null
functionfindString(str){
if(parseInt(navigator.appVersion)<4)return;
varstrFound;
if(navigator.appName=="Netscape"){
//NAVIGATOR-SPECIFICCODE
strFound=self.find(str);
if(!strFound){
strFound=self.find(str,0,1)
while(self.find(str,0,1))continue
}
}
if(navigator.appName.indexOf("Microsoft")!=-1){
//EXPLORER-SPECIFICCODE
if(TRange!=null){
TRange.collapse(false)
strFound=TRange.findText(str)
if(strFound)TRange.select()
}
if(TRange==null||strFound==0){
TRange=self.document.body.createTextRange()
strFound=TRange.findText(str)
if(strFound)TRange.select()
}
}
if(!strFound)alert("String'"+str+"'notfound!")
}
//-->
</script>
1. 下拉菜单中的链接(Links in Select Menu)
Q:我如何实现在下拉菜单中链接到不同的页面?
A:要创建一个所示的下拉菜单:选择一个页面
JavaScript FAQ
Numbers
Strings
Navigation
Colors
JavaScripter.net
你可以使用下面的代码:
<form>
<select
onChange="if(this.selectedIndex!=0)
self.location=this.options[this.selectedIndex].value">
<optionvalue=""selected>Selectapage
<optionvalue="startpag.htm">JavaScriptFAQ
<optionvalue="numbers.htm">Numbers
<optionvalue="strings.htm">Strings
<optionvalue="navigati.htm">Navigation
<optionvalue="colors.htm">Colors
<optionvalue="http://www.javascripter.net">JavaScripter.net
</select>
</form>
只需要把菜单项及其相应的URL改为你需要就可以了。你可以使用绝对地址(就像http://www.javascripter.net),也可以使用相对地址(像 mypage.htm)。
2. 按钮链接(Button Links)
Q:我怎么才能把一个按钮变为指向另外一个页面的超链接呢?
A:要创建一个按钮就像一个:
你可以使用这段代码:
<form>
<inputtype=button
value="insertbuttontexthere"
onClick="self.location='Your_URL_here.htm'">
</form>
只需要改为你需要的按钮文本和目标地址。试一下这个:
你可以使用绝对地址(像http://www.javascripter.net)也可以使用相对地址(像mypage.htm)。
3. 后退按钮(Back Button)
Q:我能让按钮像浏览器的“后退”按钮一样吗?
A:要创建你自己的后退按钮,可以使用这段代码:
<form>
<inputtype=buttonvalue="Back"
onCLick="history.back()">
</form>
现在试一下:
4. 前进按钮(Forward Button)
Q:我能让按钮像浏览器中的“前进”按钮一样吗?
A:要创建自己的“前进”按钮,使用这段代码:
<form>
<inputtype=buttonvalue="Forward"
onCLick="history.forward()">
</form>
如果浏览器上的前进按钮当前不可用,那么这个“前进”按钮同样不能工作。这种情况就是当前页是你浏览历史中的最后一页。换句话说,如果你是使用浏览器的“后退”按钮到达的这个页面(或者脚本编写的后退按钮),那么这个前进按钮就可以工作。现在试一下吧!
5. 查询字符串(Query Stirngs)
Q:我的脚步可以访问当前URL中的查询字符串吗?
A:查询字符串(或搜索字符串)是URL中的一个可选部分,它跟在文件名后面,以问号引导(?)。例如,下面的URL在HTML文件名后包含了一个查询字符串 ?myquery:
http://www.myfirm.com/file.html?myquery
你的脚本可以使用JavaScript的location.search属性访问当前URL中的查询字符按。点击下面按钮试一下看看!(为了查看地址中的URL,你可能想要在顶层浏览器窗口中显示这个页面。)
创建这些按钮的代码是:
<form>
<inputtype=buttonvalue="Addquery?test"
onClick="selfself.location=
self.location.protocol+'//'
+self.location.host
+self.location.pathname+'?test'">
<inputtype=buttonvalue="Showquery"
onClick="alert('Querystring:'+self.location.search)">
<inputtype=buttonvalue="Removequery"
onClick="selfself.location=
self.location.protocol+'//'
+self.location.host
+self.location.pathname">
</form>
注意:查询字符串有时候可能不会如预期一样的工作。例如,如果你将这个页面保存本地磁盘上,上面在Internet Explorer 4.x就不会工作(但是在Netscape Navigator中依然有效)。
6. 向页面传递参数(Passing parameters to a page)
Q:我可以从也页面向另外一个页面传递参数吗?
A:可以。有几种不同的方式可以实现:
把参数保存在cookie中
把参数保存在另外一个窗口或框架的变量中
把参数存在可以修改的属性top.name(浏览器窗口的名字)中
把参数作为一个查询字符串拼接在目标页面的URL后面
这里是一个简单的例子来演示所有这些传递参数的方法。传递的值应该是字符换“It_worked”。当你点击下面的按钮时,按钮的事件脚本会存在这些值(1)在名为parm_value的cookie中,(2)以顶层变量top.parm_value保存以及(3)在top.name属性中。然后,脚本引导浏览器到parm_get.htm,它的URL包含一个值为URL编码的查询字符串。
7. 查找文本(Searching for text)
Q:我怎样在页面查询一个特定的文本字符串?
A:在Netscape Navigator 4.x中,可以使用window.find(string) 方法查找;参见查找对话框。在Internet Explorer 4.x或更新版本中,创建一个文本范围对象(下面的例子中是TRang),然后使用TRang.findText(string)。
示例:下面的脚本根据用户输入的文本查找并在页面上高亮显示。
这个示例的代码为:
<formname="f1"action=""
onSubmit="if(this.t1.value!=null&&this.t1.value!='')
findString(this.t1.value);returnfalse"
>
<inputtype="text"name=t1value=""size=20>
<inputtype="submit"name=b1value="Find">
</form>
<scriptlanguage="JavaScript">
<!--
varTRange=null
functionfindString(str){
if(parseInt(navigator.appVersion)<4)return;
varstrFound;
if(navigator.appName=="Netscape"){
//NAVIGATOR-SPECIFICCODE
strFound=self.find(str);
if(!strFound){
strFound=self.find(str,0,1)
while(self.find(str,0,1))continue
}
}
if(navigator.appName.indexOf("Microsoft")!=-1){
//EXPLORER-SPECIFICCODE
if(TRange!=null){
TRange.collapse(false)
strFound=TRange.findText(str)
if(strFound)TRange.select()
}
if(TRange==null||strFound==0){
TRange=self.document.body.createTextRange()
strFound=TRange.findText(str)
if(strFound)TRange.select()
}
}
if(!strFound)alert("String'"+str+"'notfound!")
}
//-->
</script>
相关文章推荐
- 运行ORACLE数据库的AIX Kernel CPU使用率高达40%的排查
- ORACLE-多表关联
- oracle函数详解
- JDBC简单整理1
- 【转】Oracle TYPE OBJECT 深入
- 【转】45 个非常有用的 Oracle 查询语句
- 【转】Oracle正则表达式函数
- 【转】Oracle 中的 FORALL 语句
- 【转】Oracle 树操作(select…start with…connect by…prior)
- 【转】oracle connect by用法
- 【转】Oracle的Replace函数与translate函数详解与比较
- 【转】oracle中cursor与refcursor及sys_refcursor的区别
- 【转】oracle系统包—-dbms_output用法
- 【转】Oracle dblink详解
- 【转】oracle decode函数使用方法
- 【转】oracle调用函数
- 【转】oracle异常错误处理
- 【转】Oracle用户、授权、角色管理
- 【转】Oracle中的AS和IS的不同及使用
- 【转】Oracle TYPE OBJECT 的成员函数应用