一些JAVA运算符号
作者:雨天 日期:2007-10-25
JSP 程序示例
作者:雨天 日期:2007-10-25
下面我们分析一个简单的 JSP 程序。该程序的主要功能是生成并显示一个从 0 到 9 的字符串。
程序代码
程序代码<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Insert title here</title></head>
<body>
<%@ page language="java" %>
<%! String str="0"; %>
<% for (int i=1; i < 10; i++) {
str = str + i;
}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Insert title here</title></head>
<body>
<%@ page language="java" %>
<%! String str="0"; %>
<% for (int i=1; i < 10; i++) {
str = str + i;
}
%>
PJBlog修改-禁止复制的代码和方法
作者:雨天 日期:2007-09-12
在系统首页文件(default.asp)和日志文件(article.asp)最底下加入如下代码即可.这两个文件都在根目录下.
程序代码
程序代码<noscript>
<iframe scr="*.htm"></iframe>
</noscript>
<script language="JavaScript">
document.oncontextmenu=new Function("event.returnValue=false;");
document.onselectstart=new Function("event.returnValue=false;");
</script>
<iframe scr="*.htm"></iframe>
</noscript>
<script language="JavaScript">
document.oncontextmenu=new Function("event.returnValue=false;");
document.onselectstart=new Function("event.returnValue=false;");
</script>
PJBlog修改-星座运程
作者:雨天 日期:2007-09-12
在后台增加一个新的模块,然后编辑模块代码,加入
程序代码
程序代码程序代码
<div align="center">
<table cellspacing="0" width="150" align="center">
<script type="text/javascript">
strArr_w=new Array()
strArr_w[0]=new arrItem("双鱼座","http://astro.sina.com.cn/pisces_w.shtml")
strArr_w[1]=new arrItem("水瓶座","http://astro.sina.com.cn/aquarius_w.shtml")
strArr_w[2]=new arrItem("魔羯座","http://astro.sina.com.cn/capricorn_w.shtml")
strArr_w[3]=new arrItem("天蝎座","http://astro.sina.com.cn/scorpio_w.shtml")
strArr_w[4]=new arrItem("天秤座","http://astro.sina.com.cn/libra_w.shtml")
strArr_w[5]=new arrItem("处女座","http://astro.sina.com.cn/virgo_w.shtml")
strArr_w[6]=new arrItem("狮子座","http://astro.sina.com.cn/leo_w.shtml")
strArr_w[7]=new arrItem("巨蟹座","http://astro.sina.com.cn/cancer_w.shtml")
<div align="center">
<table cellspacing="0" width="150" align="center">
<script type="text/javascript">
strArr_w=new Array()
strArr_w[0]=new arrItem("双鱼座","http://astro.sina.com.cn/pisces_w.shtml")
strArr_w[1]=new arrItem("水瓶座","http://astro.sina.com.cn/aquarius_w.shtml")
strArr_w[2]=new arrItem("魔羯座","http://astro.sina.com.cn/capricorn_w.shtml")
strArr_w[3]=new arrItem("天蝎座","http://astro.sina.com.cn/scorpio_w.shtml")
strArr_w[4]=new arrItem("天秤座","http://astro.sina.com.cn/libra_w.shtml")
strArr_w[5]=new arrItem("处女座","http://astro.sina.com.cn/virgo_w.shtml")
strArr_w[6]=new arrItem("狮子座","http://astro.sina.com.cn/leo_w.shtml")
strArr_w[7]=new arrItem("巨蟹座","http://astro.sina.com.cn/cancer_w.shtml")
PJBlog修改-在日志正文上方增加一滚动的公告板或广告板
作者:雨天 日期:2007-09-12
进入后台“界面与插件-设置模块”,在页面下方新建一个“内容模块”,模块标识和名称任意,注意排序要比“ContentList”小,点击“保存模块”。保存后点击后面的“编辑HTML源代码”,填入以下代码:
程序代码
其中WIDTH: 98%是宽度,HEIGHT: 15px是高度(这个高度为显示一行文字),scrollamount="3"为滚动速度,direction="left"为滚动方向(left是从右到左)。
程序代码<div style="CLEAR: none; BORDER-RIGHT: #dbdbd0 1px solid; BORDER-TOP: #dbdbd0 1px solid; BACKGROUND: #fff; MARGIN: 5px; BORDER-LEFT: #dbdbd0 1px solid; WIDTH: 98%; BORDER-BOTTOM: #dbdbd0 1px solid; HEIGHT: 15px"><div style="PADDING-RIGHT: 0px; DISPLAY: block; PADDING-LEFT: 3px; FLOAT: left; PADDING-BOTTOM: 0px; WIDTH: 5px; COLOR: #2e8b57; PADDING-TOP: 6px">公</div><div style="PADDING-RIGHT: 0px; DISPLAY: block; PADDING-LEFT: 1px; FLOAT: left; PADDING-BOTTOM: 0px; WIDTH: 5px; COLOR: #2e8b57; PADDING-TOP: 6px">告</div><div style="MARGIN: 3px"><marquee onmouseout="this.start()" scrollamount="3" scrolldelay="15" direction="left" height="15"><font color="#999999">[时间或编号]</font><font color="#0000ff"><b>第一条公告题头</b>第一条公告内容</font>< font color="#999999">[时间或编号]</font><font color="#0000ff"><b>第二条公告题头</b>第二条公告内容</font>< /marquee></div></div>
其中WIDTH: 98%是宽度,HEIGHT: 15px是高度(这个高度为显示一行文字),scrollamount="3"为滚动速度,direction="left"为滚动方向(left是从右到左)。
网页中FLASH播放完自动关闭[实例源码]
作者:雨天 日期:2007-06-13
网页中FLASH播放完自动关闭的原理是将FLASH放在一个DIV中;当FLASH播放到最后一帧时隐藏DIV;
实现的办法如下:
1.首先在网页中加上如下代码:
程序代码
2.以下是网页中div和swf的代码;和平时没有什么区别;只是swf和div分别多了一个ID; 他们的ID分别为:zishu floater
程序代码
实现的办法如下:
1.首先在网页中加上如下代码:
程序代码<SCRIPT language=JavaScript event=FSCommand() for=zishu>floater.style.visibility='hidden';</SCRIPT>
2.以下是网页中div和swf的代码;和平时没有什么区别;只是swf和div分别多了一个ID; 他们的ID分别为:zishu floater
程序代码<div id="floater">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="720" height="480" id="zishu">
<param name="movie" value="a.swf">
<param name="quality" value="high">
<embed src="a.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="720" height="480"></embed></object>
</div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="720" height="480" id="zishu">
<param name="movie" value="a.swf">
<param name="quality" value="high">
<embed src="a.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="720" height="480"></embed></object>
</div>
iframe透明背景代码
作者:雨天 日期:2007-06-13
在transparentBody.htm文件的<body>标签中,我已经加入了style="background-color=transparent" 通过以下四种IFRame的写法我想大概你对iframe背景透明效果的实现方法应该会有个清晰的了解:
程序代码以上效果必须在IE5.5以上才支持。
程序代码<IFRame ID="Frame1" SRC="transparentBody.htm" allowTransparency="true"></IFRame>
<IFRame ID="Frame2" SRC="transparentBody.htm" allowTransparency="true" STYLE="background-color: green"> </IFRame>
<IFRame ID="Frame3" SRC="transparentBody.htm"></IFRame>
<IFRame ID="Frame4" SRC="transparentBody.htm" STYLE="background-color: green"> </IFRame>
<IFRame ID="Frame2" SRC="transparentBody.htm" allowTransparency="true" STYLE="background-color: green"> </IFRame>
<IFRame ID="Frame3" SRC="transparentBody.htm"></IFRame>
<IFRame ID="Frame4" SRC="transparentBody.htm" STYLE="background-color: green"> </IFRame>
Iframe框架高度自适应的实现
作者:雨天 日期:2007-06-13
解决iframe框架页面自适应高度问题代码如下,需要注意的是框架引用页面一定要设置name属性,否则会不生效
方案一:
程序代码
test.asp页面head间增加如下JS代码
程序代码
方案一:
程序代码<iframe src="test.asp" width="100%" frameborder="0" scrolling="no" name="hj" id="hj"></iframe>
test.asp页面head间增加如下JS代码
程序代码<SCRIPT LANGUAGE="JavaScript">
function f_frameStyleResize(targObj){
var targWin = targObj.parent.document.all[targObj.name];
function f_frameStyleResize(targObj){
var targWin = targObj.parent.document.all[targObj.name];
iframe嵌入网页的用法
作者:雨天 日期:2007-06-13
引用内容iframe并不是很常用的,在标准的网页中非常少用。但是有朋友经常问到,下面我简单地介绍一下它的用法,你只要熟练掌握这些参数足矣。
<iframe>也应该是框架的一种形式,它与<frame>不同的是,iframe可以嵌在网页中的任意部分。我们举第一个例子,具体代码如:
<iframe width=420 height=330 frameborder=0 scrolling=auto src=URL></iframe>,这里的URL可以是相对路径,也可以是绝对路径,效果如:
width表示宽度,height表示宽度,可根据实际情况调整。
scrolling表示是否显示页面滚动条,可选的参数为auto、yes、no,如果省略这个参数,则默认为auto。
二、如何实现页面上的超链接指向这个嵌入的网页?
只要给这个iframe命名就可以了。方法是<iframe name=**>,例如我命名为aa,写入这句HTML语言<iframe width=420 height=330 name=aa frameborder=0 src=http://www.cctv.com></iframe>,然后,网页上的超链接语句应该写为:<a href=URL target=aa>
三、如果把frameborder设为1,效果就像文本框一样,如下
<iframe>也应该是框架的一种形式,它与<frame>不同的是,iframe可以嵌在网页中的任意部分。我们举第一个例子,具体代码如:
<iframe width=420 height=330 frameborder=0 scrolling=auto src=URL></iframe>,这里的URL可以是相对路径,也可以是绝对路径,效果如:
width表示宽度,height表示宽度,可根据实际情况调整。
scrolling表示是否显示页面滚动条,可选的参数为auto、yes、no,如果省略这个参数,则默认为auto。
二、如何实现页面上的超链接指向这个嵌入的网页?
只要给这个iframe命名就可以了。方法是<iframe name=**>,例如我命名为aa,写入这句HTML语言<iframe width=420 height=330 name=aa frameborder=0 src=http://www.cctv.com></iframe>,然后,网页上的超链接语句应该写为:<a href=URL target=aa>
三、如果把frameborder设为1,效果就像文本框一样,如下
滚动文字
作者:雨天 日期:2007-04-16
程序代码<marquee name=news id=news behavior=scroll direction=left scrollamount=5 scrolldelay=1 hspace=0 vspace=0 onmouseover="scrollstop()" onmouseout="scrollplay()">
<b>3P代码网欢迎你的光临,请多提意见,谢谢</b>
</marquee>
direction=left 左滚
direction=right 右滚
scrollamount=5 数量
scrolldelay=10 延时
<b>3P代码网欢迎你的光临,请多提意见,谢谢</b>
</marquee>
direction=left 左滚
direction=right 右滚
scrollamount=5 数量
scrolldelay=10 延时
----------------------------------
程序代码<marquee width=300 height=330 onmouseover="this.statr()" onmouseout="this.stop()" direction=up scrollamount=1>文字内容。</marquee>



