onmouseout="this.bgColor='#FAFBFC';">
32.改变文字输入框的背景颜色
.input2 {background-image: url('../images/inputbg.gif'); font-size: 12px; background-color:
#D0DABB;border-top-width:1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
33.改变水平线的特征
34.传递参数的方式
35.页内跳转
dfdf
dfdf//
36.两个按键一起按下
if(event.ctrlKey && window.event.keyCode==13)//
37.刷新页面
javascript:this.location.reload()//
38.将网页的按钮使能
function haha()
{
for(var i=0;i
{
if(document.form1.elements[i].name.indexOf("bb")!=-1)
document.form1.elements[i].disabled=!document.form1.elements[i].disabled;
}
}
39.文字移动
40.双击网页自动跑
var currentpos,timer;
function initialize()
{
timer=setInterval("scrollwindow()",1);
}
function sc()
{
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos != document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize
//
41.后退
42.前进
43.刷新
44.转向指定网页
document.location="http://ww"或者document.location.assign("http://guoguo.com")
45.在网页上显示实时时间
var clock_id;
window.onload=function()
{
clock_id=setInterval("document.form1.txtclock.value=(new Date);",1000)
}
//
46.可以下载文件
document.location.href="http://www.php1.cn/">
47.连接数据库
import java.sql.*;
String myDBDriver="sun.jdbc.odbc.JdbcOdbcDriver";
Class.forName(myDBDriver);
Connection conn=DriverManager.getConnection("jdbc:odbc:firm","username","password");
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery(sql);
rs.getString("column1");//
48.可以直接在页面“div”内写下所需内容
//
49. You can change the format of the link on the page to make it double-line
A:link {text-decoration: none; color:#0000FF; font-family:宋体}
A:visited {text-decoration: none; color: #0000FF; font-family: 宋体}
A:hover {text-decoration: underline overline; color: FF0000}
A:link {text-decoration: none; color: #0000FF; font-family: 宋体}
A:visited {text-decoration: none; color: #0000FF; font-family : 宋体}
A:hover {text-decoration: underline overline line-through; color: FF0000}
TH{FONT-SIZE: 9pt}
TD{FONT-SIZE: 9pt}
body {SCROLLBAR-FACE -Color: #A9D46D; scrollbar-highlight-color: #e7e7e7; scrollbar-shadow-color: #e7E7E7;
T: 15pt; Scrollbar-Rarrow-COLOR: # ffffff;
SCROLLBAR-TRACK-COLOR: #e7e7e7;}
INPUT{BORDER-TOP-WIDTH: 1px; PADDING-RIGHT: 1px; PADDING-LEFT: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE:
9pt; BORDER-LEFT-COLOR: #cccccc;
BORDER-BOTTOM-WIDTH: 1px; BORDER-BOTTOM-COLOR: #cccccc; PADDING-BOTTOM: 1px; BORDER-TOP-COLOR: #cccccc;
PADDING-TOP: 1px; HEIGHT: 18px; BORDER-RIGHT-WIDTH: 1px; BORDER-RIGHT-COLOR: #cccccc}
DIV,form ,OPTION,P,TD,BR{FONT- FAMILY: 宋体; FONT-SIZE: 9pt}
textarea, select {border-width: 1; border-color: #000000; background-color: #efefef; font-family: 宋体;
font-size: 9pt; font-style: bold;}
.text { font-family: "宋体"; font-size: 9pt; color: #003300; border: #006600 solid; border-width: 1px 1px
1px 1px}
Complete css
50. New frame
href="http://www.php1.cn/">
/a_13.html')">
51. Write content to the file
<%@ page import="java.io.*" %>
<% String str = "print me"; //always give the path from root. This way it almost always works. String nameOfTextFile = "/usr/anil/imp.txt"; try { PrintWriter pw = new PrintWriter(new FileOutputStream(nameOfTextFile)); pw. println(str); //clean up pw.close(); } catch(IOException e) { out.println(e.getMessage()); } %>
52. Read the file first and then write the file
<%@ page language = "java" %>
<%@ page contentType = "text/html; charSet=gb2312" %> ; <%@ page import ="java.util.*" %>
<%@ page import ="java.lang.*" %>
<%@ page import ="javax .servlet.*" %>
<%@ page import ="javax.servlet.jsp.*" %>
<%@ page import ="javax.servlet.http.*" %>
<%@ page import="java.io.*" %>
eryrytry
<% int count=0; FileInputStream fi =new FileInputStream ("count.txt"); ObjectInputStream si= new ObjectInputStream (fi); count =si.readInt(); count++; out.print(count); si.close(); FileOutputStream fo =new FileOutputStream ("count.txt"); ObjectOutputStream so= new ObjectOutputStream (fo); so.writeInt(count); so.close(); %>
53. Linear input box
54. You can change the background to a button shape and change the attributes by changing css
| 55. Press the CTRL and Q keys simultaneously
---------------------------------------------------------------------------------------------------------
--------------------------------- -------------------------------------------------- --------------------------
57. Pop-up window
Note: The "#" used is a virtual connection.
58. Dynamically change the font size
var newWin=window . open(url);
opener.document.form2.text2.value=value2;Change the value of the field of the parent window
59. Determine what kind of browser it is
61. Copy content to clipboard
Class.forName("sun.jdbc.odbc. JdbcOdbcDriver");
Connection con=DriverManager.getConnection(url,"sa","");//mssql database user SA and password
ResultSet rs=stmt.executeQuery("select * from company.dbo.TB_NAME where number=1"); //Sql
System.out.println(dispresult);// Instead, you can display it in Paint() or use AWT etc.
63. Minimize the window
64. The path of the document
65. Execute a certain program regularly
66. Set as homepage
netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesWrite");
67. Set as favorites
window.external.AddFavorite(location.href,'WWW.OGRISH.COM: GROTESQUE MOVIES AND PICTURES');
68. Judgment Whether cookies are available
69. Display a modal pop-up window with a page
var color = showModalDialog("/mailpage/compose/colorsel. html",0,"help=0");
<script></p>
<p>function noEffect() {</p>
<p> with (event) {</p>
<p> returnValue = false;</p>
<p> cancelBubble = true; </p>
<p> }</p>
<p> return;</p>
<p>}</p> <p>< /script></p>
<p><body onselectstart="noEffect()" oncontextmenu="noEffect()">//</p>
<p> </p>
<p>72. Shield the right-click menu</p>
<p>oncontextmenu="event.returnValue = false"//</p>
<p> </p>
<p>73. Disable event bubbling</p>
<p>event.cancelBubble = true//</p>
<p> </p>
<p>74. Disable opening the input method in the input box</p>
<p><input style="ime-mode: disabled">//</p>
<p> </p>
<p>75. Block Chinese characters and spaces</p>
<p><input name="txt"><input type="submit" onClick="alert(!/[^ -}]|/s/.test(txt.value ; "Scripting.FileSystemObject");</p><p> alert(fso.FileExists(filespec));</p><p>}</p><p>}</p><p>Select image<input type=file name=f1><p></p>
<p><input type= "submit" onClick="Exists(f1.value)">//</p>
<p> </p>
<p>77. Get the text selected in the current text box</p>
<p><input onmouseup="alert(document.selection.createRange().text )" value=123>//</p>
<p> </p>
<p>78. Jump to the target page and cannot return</p>
<p><a href="http://www.php1.cn/"></p>
<p> </p>
<p> </p>
<p> 79. Get which row of the table the current row is </p>
<p><script></p>
<p>function getrow(obj)</p>
<p>{</p>
<p> if(event.srcElement.tagName=="TD"){</p>
<p> curRow=event. srcElement.parentElement;</p>
<p> alert("This is the "+(curRow.rowIndex+1)+"row");</p>
<p> </p>
<p> }</p>
<p>}</p>
<p></script>
80. Delete a certain row of the table, xx represents a certain row, the following The index is calculated from 0
81. Dynamically add rows to the table
102. It is a special container, you can install a web page if you want
103. External html code
104. Identifies the trigger of the current IE event
event.srcElement and event. keyCode//
105. Event type
106. Dynamically change the type
.Overnone { border-width:0;background-color:darkblue; cursor:default;color:gold;width:115}
107. Page flip
parent. scroll(x,y);//
109. Change the status bar
110. Change the window size
111. Change the mouse Style y Styledbody {cursor: url ('mouse.ani');
112. The background is transparent
113. The mouse is in the waiting shape
114. Call the function of the parent window
116. The function of calling the parent window in the frame
117. Exchange nodes