3. A borderless window that can still be used after adding sp1! !
<HTML XMLNS:IE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<IE:Download ID="include" STYLE="behavior:url(#default#download)" />
<title>Chromeless Window</title>
<SCRIPT LANGUAGE="JScript">
/*--- Special Thanks For andot ---*/
/*
This following code are designed and writen by Windy_sk <seasonx@>
You can use it freely, but u must held all the copyright items!
*/
/*--- Thanks For andot Again ---*/
var CW_width = 400;
var CW_height = 300;
var CW_top = 100;
var CW_left = 100;
var CW_url = "/";
var New_CW = ();
var CW_Body = New_CW.;
var content = "";
var CSStext = "margin:1px;color:black; border:2px outset;border-style:expression(onmouseout=onmouseup=function(){='outset'}, onmousedown=function(){if(!=2)='inset'});background-color:buttonface;width:16px;height:14px;font-size:12px;line-height:11px;cursor:Default;";
//Build Window
(CW_url, function(source){content=source});
function insert_content(){
var temp = "";
CW_Body. = "hidden";
CW_Body. = "white";
CW_Body. = "solid black 1px";
content = (/<a ([^>]*)>/g,"<a onclick='();return false' $1>");
temp += "<table width=100% height=100% cellpadding=0 cellspacing=0 border=0>";
temp += "<tr style=';font-size:12px;background:#0099CC;height:20;cursor:default' ondblclick=\"==='1'?'2':'1';parent.if_max=!parent.if_max;parent.show_CW();\" onmouseup='parent.drag_up(event)' onmousemove='parent.drag_move(event)' onmousedown='parent.drag_down(event)' onselectstart='return false' oncontextmenu='return false'>";
temp += "<td style='color:#ffffff;padding-left:5px'>Chromeless Window For IE6 SP1</td>";
temp += "<td style='color:#ffffff;padding-right:5px;' align=right>";
temp += "<span id=Help onclick=\"alert('Chromeless Window For IE6 SP1 - Ver 1.0\\n\\nCode By Windy_sk\\n\\nSpecial Thanks For andot')\" style=\""+CSStext+"font-family:System;padding-right:2px;\">?</span>";
temp += "<span id=Min onclick='parent.New_CW.hide();()' style=\""+CSStext+"font-family:Webdings;\" title='Minimum'>0</span>";
temp += "<span id=Max onclick=\"==='1'?'2':'1';parent.if_max=!parent.if_max;parent.show_CW();\" style=\""+CSStext+"font-family:Webdings;\" title='Maximum'>1</span>";
temp += "<span id=Close onclick='=null;()' style=\""+CSStext+"font-family:System;padding-right:2px;\" title='Close'>x</span>";
temp += "</td></tr><tr><td colspan=2>";
temp += "<div id=include style='overflow:scroll;overflow-x:hidden;overflow-y:auto; HEIGHT: 100%; width:"+CW_width+"'>";
temp += content;
temp += "</div>";
temp += "</td></tr></table>";
CW_Body.innerHTML = temp;
}
setTimeout("insert_content()",1000);
var if_max = true;
function show_CW(){
(10000, 10000);
if(if_max){
New_CW.show(CW_top, CW_left, CW_width, CW_height);
if(typeof(New_CW.)!="undefined"){
New_CW. = CW_width;
New_CW. = "1";
}
}else{
New_CW.show(0, 0, , );
New_CW. = ;
}
}
= show_CW;
= show_CW;
// Move Window
var drag_x,drag_y,draging=false
function drag_move(e){
if (draging){
New_CW.show(-drag_x, -drag_y, CW_width, CW_height);
return false;
}
}
function drag_down(e){
if(==2)return;
if(New_CW.== && New_CW.==)return;
drag_x=;
drag_y=;
draging=true;
();
}
function drag_up(e){
draging=false;
();
if(New_CW.== && New_CW.==) return;
CW_top = -drag_x;
CW_left = -drag_y;
}
</SCRIPT>
</HTML>
Verification of phone number
Require:
(1) Phone number consists of numbers, "(", ")" and "-"
(2) Phone numbers are 3 to 8 digits
(3) If the phone number contains an area code, then the area code is three or four digits
(4) Area codes are separated from other parts by "(", ")" or "-"
(5) The mobile phone number is 11 or 12 digits. If it is 12 digits, then the first digit is 0
(6) The first and second digits of the 11-digit mobile phone number are "13"
(7) The second and third digits of the 12-digit mobile phone number are "13"
According to these rules, the following regular expressions can be drawn:
(^[0-9]{3,4}\-[0-9]{3,8}$)|(^[0-9]{3,8}$)|(^\([0-9]{3,4}\)[0-9]{3,8}$)|(^0{0,1}13[0-9]{9}$)
<script language="javascript">
function PhoneCheck(s) {
var str=s;
var reg=/(^[0-9]{3,4}\-[0-9]{3,8}$)|(^[0-9]{3,8}$)|(^\([0-9]{3,4}\)[0-9]{3,8}$)|(^0{0,1}13[0-9]{9}$)/
alert((str));
}
</script>
<input type=text name="iphone">
<input type=button onclick="PhoneCheck()" value="Check">
It has the effect of not echoing non-numeric characters when inputting non-numeric characters, that is, it does not react to input of non-numeric characters.
function numbersonly(field,event){
var key,keychar;
if(){
key = ;
}
else if (event){
key = ;
}
else{
return true
}
keychar = (key);
if((key == null)||(key == 0)||(key == 8)||(key == 9)||(key == 13)||(key == 27)){
return true;
}
else if(("0123456789.").indexOf(keychar)>-1){
= "";
return true;
}
else {
= "Field excepts numbers only";
return false;
}
}
Verify ip
str=;
if(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.test(str)==false)
{
('Wrong IP address format');
();
();
return;
}
if(RegExp.$1<1 || RegExp.$1>254||RegExp.$2<0||RegExp.$2>254||RegExp.$3<0||RegExp.$3>254||RegExp.$4<1||RegExp.$4>254)
{
('Wrong IP address');
();
();
return;
}
//Exclude 0 like 010.020.020.03
var str=(/0(\d)/g,"$1");
str=(/0(\d)/g,"$1");
(str);
//The following is the class that fetches the data
//Obj parameter specifies the source of the data (qualified Table), the default first behavior field name line
//GetTableData class provides the MoveNext method, the parameters are the number of bits that move up or down in the table row, the positive number moves down, and the negative number goes up.
//GetFieldData method obtains the data of the specified column name
//Sort_desc method arranges the specified columns in descending order
//Sort_asc method arranges the specified columns in ascending order
//GetData method returns an array of data with a field value of a specific value, provides data, and other processing can be performed externally.
//Delete method deletes the current record, reduces the array by one line
//Initialization, Obj: the name of table, Leftlen: the excess data length on the left, Rightlen: the excess data length on the right,
function GetTableData(Obj,LeftLen,RightLen){
var MyObj=(Obj);
var iRow=;
var iLen=[0].;
var i,j;
TableData=new Array();
for (i=0;i< iRow;i++){
TableData[i]=new Array();
for (j=0;j<iLen;j++){
TableStr=(i).cells(j).innerText;
TableStr=(LeftLen, -RightLen).Trim();
TableStr=(/ /gi,"").replace(/\r\n/ig,"");
TableData[i][j]=TableStr;
}
}
=TableData;
=[0].length;
=;
=0;
}
function movenext(Step){
if (>=){
return
}
if (Step=="" || typeof(Step)=="undefined") {
if (<-1)
++;
return;
}
else{
if ( + Step<=-1 && + Step>=0 ){
= + Step;
}
else
{
if ( + Step<0){
= 0;
return;
}
if ( + Step>-1){
= -1;
return;
}
}
}
}
function getfielddata(Field){
var colindex=-1;
var i=0;
if (typeof(Field) == "number"){
colindex=Field;
}
else
{
for (i=0;i< && < ;i++){
if ([0][i]==Field){
colindex=i;
break;
}
}
}
if (colindex!=-1) {
return [][colindex];
}
}
function sort_desc(){// descending order
var colindex=-1;
var highindex=-1;
desc_array=new Array();
var i,j;
for (n=0; n<; n++){
Field=arguments[-1-n];
for (i=0;i<;i++){
if ([0][i]==Field){
colindex=i;
break;
}
}
if ( colindex==-1 )
return;
else
{
desc_array[0]=[0];
for(i=1;i<;i++){
desc_array[i]=[1];
highindex=1;
for(j=1;j<;j++){
if (desc_array[i][colindex]<[j][colindex]){
desc_array[i]=[j];
highindex=j;
}
}
if (highindex!=-1)
=(0,highindex).concat((highindex+1,));
}
}
=desc_array;
}
return;
}
function sort_asc(){//Asc
var colindex=-1;
var highindex=-1;
var i,j;
for (n=0; n<; n++){
asc_array=new Array();
Field=arguments[-1-n];
for (i=0;i<;i++){
if ([0][i]==Field){
colindex=i;
break;
}
}
if ( colindex==-1 )
return;
else
{
asc_array[0]=[0];
for(i=1;i<;i++){
asc_array[i]=[1];
highindex=1;
for(j=1;j<;j++){//Find out the smallest column value
if (asc_array[i][colindex]>[j][colindex]){
asc_array[i]=[j];
highindex=j;
}
}
if (highindex!=-1)
=(0,highindex).concat((highindex+1,));
}
}
=asc_array;
}
return;
}
function getData(Field,FieldValue){
var colindex=-1;
var i,j;
GetData=new Array();
if (typeof(Field)=="undefined" || typeof(FieldValue)=="undefined" ){
return ;
}
for(j=0;j<;j++){
if ([0][j]==Field){
colindex=j;
}
}
if (colindex!=-1){
for(i=1;i<;i++){
if ([i][colindex]==FieldValue){
GetData[i]=new Array();
GetData[i]=[i];
}
}
}
return GetData;
}
function DeletE(){
=(0,).concat((+1,));
=;
return;
}
function updateField(Field,FieldValue){
var colindex=-1;
var i=0;
if (typeof(Field) == "number"){
colindex=Field;
}
else
{
for (i=0;i< && < ;i++){
if ([0][i]==Field){
colindex=i;
break;
}
}
}
if (colindex!=-1) {
[][colindex]=FieldValue;
}
}
function movefirst(){
=0;
}
function movelast(){
=-1;
}
function () {return (/(^\s*)|(\s*$)/g,"");}
= movenext;
= getfielddata;
.Sort_asc = sort_asc;
.Sort_desc = sort_desc;
= getData;
= DeletE;
= updateField;
= movefirst;
Specific example: http://202.119.73.208/NetEAn/com/test/
Call the verification code in the onblur event of each text box, and write an enter to tab function in the onKeyDown event in each text box.
//Replace the Enter key with tab
function enterToTab()
{
if( != 'button' && != 'textarea'
&& == 13)
{
= 9;
}
}
Previous page123Next pageRead the full text