Skills
<input style= "ime-mode:disabled" > Close IME
Cursor is stopped at the end of text box text
<script language= "JavaScript" >
function cc ()
{
var e = event.srcelement;
var r =e.createtextrange ();
R.movestart (' character ', e.value.length);
R.collapse (TRUE);
R.select ();
}
</script>
<input type=text name=text1 value= "123" >
Keep pop-up windows always on top:
<body onblur= "This.focus ();" >
How to remove the picture link after clicking the dotted line around the picture?
<a href= "#" ></a>
How do I write in the code that refreshes the parent window in the Open child window?
Window.opener.location.reload ()
How to set the size of an open page
<body >
The location where the page opens <body >
How to add a background picture that is not a full spread in the page, the background image does not move when pulling the page
<STYLE>
Body
{Background-image:url (logo.gif); background-repeat:no-repeat;
Background-position:center;background-attachment:fixed}
</STYLE>
Check whether a string of strings is composed entirely of digits
<script language= "Javascript" ><!--
function Checknum (str) {return Str.match (//d/) ==null}
Alert (Checknum ("1232142141"))
Alert (Checknum ("123214214A1"))
--></script>
Get the size of a window
Document.body.clientWidth; Document.body.clientHeight
How to judge whether it is a character
if (/[^/x00-/xff]/g.test (s)) alert ("contains Chinese characters");
else alert ("All characters");
TextArea the number of adaptive lines of text
<textarea Rows=1 name=s1 cols=27 onpropertychange= "This.style.posheight=this.scrollheight" >
</textarea>
Date minus days equals second date
<script language=javascript>
function cc (DD,DADD)
{
You can add error handling
var a = new Date (DD)
A = A.valueof ()
A = A-dadd * 24 * 60 * 60 * 1000
A = new Date (a)
Alert (a.getfullyear () + "year" + (A.getmonth () + 1) + "month" + a.getdate () + "Day")
}
CC ("12/23/2002", 2)
</script>
No Close button IE
window.open ("aa.htm", "Meizz", "fullscreen=7");
Window maximization
<body >