1、9pt;BACKGROUND-COLOR: #E8E8FF; color:#6666665.按钮颜色变化input type=text name=nick style=1px solid #666666; #F4F4FF;#ff6600 size=15 maxlength=166.平面输入框T120border-style: solid; border-width: 17.使窗口变成指定的大小scriptwindow.resizeTo(300,283);/script8.使文字上下滚动marquee direction=up scrollamount=1 scrolldelay=100 onm
2、ouseover=this.stop() onmouseout=this.start()height=60!- head_scrolltext -trtd共和国/table /marquee9.状态栏显示该页状态base onmouseover=window.status=网站建设 ;return true10.可以点击文字实现radio选项的选定br radioregtypeA03 id=label for= 情侣 : 一次注册两个帐户11.可以在文字域的font写onclick事件12.打印打印网页a href=javascript:window.print ()13.线型输入框
3、key12关键字 onFocus=this.select() onMouseOver=this.focus()class=line14.显示文档最后修改日期script language=javascriptfunction hi(str) document.write(document.lastModified) alert(hi+str+)15.可以在鼠标移到文字上时就触发事件htmlheadscript language=LiveScript- Hiding function hello() 哈罗!); /headbodya href= onMouseOver=hello()link/h
4、tml16.可以根据网页上的选项来确定页面颜色HTMLHEADTITLEbackground.html/HEADSCRIPT-function bgChange(selObj) newColor = selObj.optionsselObj.selectedIndex.text; document.bgColor = newColor; selObj.selectedIndex = -1;/-/SCRIPTBODY STYLE=font-family:ArialBChanging Background ColorsBRFORMSELECT SIZE=8 onChange=bgChange(th
5、is);OPTIONRedOrangeYellowGreenBlueIndigoVioletWhitepink/SELECT/FORM/BODY/HTML17.将按钮的特征改变style type=text/css.style1 font-size: 12px; background: #CCCCFF; thin thin thin thin; border-color: #CCCCFF#CCCCCC #CCCCCC #CCCCFF.style2 font-size: font-weight: bold; #CCFFCC; thin medium medium thin;border-colo
6、r: #CCFF99 #999999 #999999 #CCFF99-/style本例按钮的代码如下:Submit提 交 onmouseover=this.className=style2onmouseout=style1style118.改变按钮的图片.style3 font-size: url(image/buttonbg1.gif); border: 0px; 60px; 22px.style4 font-size: url(image/buttonbg2.gif); 0px 0;60px;本例的按钮代码如下:Submit2style4style3style319.打印页面div ali
7、gn=centera class=content href=doPrint();打印本稿20.可以直接写html语言document.write(21.改变下拉框的颜色select name=classidonChange=changelocation(document.myform.classid.optionsdocument.myform.classid.selectedIndex.value)size=1color:#008080;font-size: 9pt22.转至目标URLwindow.location=http:/guoguo23.传递该object的formUpdateSN(
8、guoqiang99267,this.form)function UpdateSN(strValue,strForm) strForm.SignInName.value = strValue; return false;24.文字标签AltName4input name=AltName type=RADIO tabindex=931guoqiang99859function closeit() setTimeout(self.close(),10000) /script 28.可以比较字符的大小char=post.charAt(i);if(!(0=char&char主办单位option-31.
9、改变背景颜色td width=* class=dp bgColor=#FAFBFC onmouseover=this.bgColor=#FFFFFF#FAFBFC32.改变文字输入框的背景颜色style.input2 background-image: url(./images/inputbg.gif background-color:#D0DABB;border-top-width:1px; border-right-width: 1px; border-bottom-width: border-left-width: 1pxinput name=content type=text size
10、=47input25033.改变水平线的特征hr size=0 noshade color=#C0C0C034.传递参数的方式vote.asp?CurPage=8&id=3488835.页内跳转#11#22#33#44#55#66#77a name=dfdf236.两个按键一起按下if(event.ctrlKey & window.event.keyCode=13)/37.刷新页面this.location.reload()/38.将网页的按钮使能SCRIPT LANGUAGE=function haha() for(var i=0;iform name=form1INPUT TYPE= NA
11、ME=aa value=cindy onclick=haha()bb value=guoguo39.文字移动marquee scrollamount=3 onmouseover=this.stop(); onmouseout=this.start();40.双击网页自动跑var currentpos,timer;function initialize() timer=setInterval(scrollwindow(),1);function sc() clearInterval(timer);function scrollwindow() currentpos=document.body.s
12、crollTop; window.scroll(0,+currentpos); if (currentpos != document.body.scrollTop) sc();document.onmousedown=scdocument.ondblclick=initialize41.后退 onclick=window.history.back() value=back42.前进 onclick=window.history.forward() value=forward43.刷新 onclick=document.location.reload() value=reload44.转向指定网
13、页document.location=/ww或者document.location.assign(45.在网页上显示实时时间var clock_id;window.onload=function() clock_id=setInterval(document.form1.txtclock.value=(new Date);,1000)46.可以下载文件document.location.href=目标文件47.连接数据库import java.sql.*;String myDBDriver=sun.jdbc.odbc.JdbcOdbcDriverClass.forName(myDBDriver
14、);Connection conn=DriverManager.getConnection(jdbc:odbc:firm,usernamepasswordStatement stmt=conn.createStatement();ResultSet rs=stmt.executeQuery(sql);rs.getString(column148.可以直接在页面“div”内写下所需内容 onclick=a1.innerHTML=font color=red*div id=a149.可以改变页面上的连接的格式,使其为双线A:link text-decoration: none;#0000FF; f
15、ont-family: 宋体visited text-decoration: #0000FF;hover text-decoration: underline overline; FF0000 underline overline line-through;THFONT-SIZE: 9ptTDFONT-SIZE:body SCROLLBAR-FACE-COLOR: #A9D46D; SCROLLBAR-HIGHLIGHT-COLOR: #e7e7e7;SCROLLBAR-SHADOW-COLOR:#e7e7e7;SCROLLBAR-3DLIGHT-COLOR: #000000; LINE-HE
16、IGHT: 15pt; SCROLLBAR-ARROW-COLOR: #ffffff;SCROLLBAR-TRACK-COLOR:INPUTBORDER-TOP-WIDTH: PADDING-RIGHT: PADDING-LEFT: BORDER-LEFT-WIDTH: FONT-SIZE: BORDER-LEFT-COLOR: #cccccc;BORDER-BOTTOM-WIDTH: BORDER-BOTTOM-COLOR: PADDING-BOTTOM: BORDER-TOP-COLOR:PADDING-TOP: HEIGHT: 18px; BORDER-RIGHT-WIDTH: BORD
17、ER-RIGHT-COLOR: #ccccccDIV,form ,OPTION,P,TD,BRFONT-FAMILY: 宋体;textarea, select border-width: 1; #efefef; 9pt; font-style:.text font-family: 宋体 #003300; #006600 solid; 1px 1px1px 1px完整的css50.新建frameahref=newframe(/a_13.html)img alt=帮助 border=0 src=51.向文件中写内容% page import=java.io.* %String str = prin
18、t me/always give the path from root. This way it almost always works.String nameOfTextFile = /usr/anil/imp.txttry PrintWriter pw = new PrintWriter(new FileOutputStream(nameOfTextFile); pw.println(str); /clean up pw.close();catch(IOException e) out.println(e.getMessage();%52.先读文件再写文件% page language = java% page contentType = text/html; charSet=gb2312% page import =java.util.*java.lang.*% page impor
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1