When using the ajaxpro method, you must note that the method on the background page cannot use some built-in encapsulation methods of the foreground page control, such.
Id. Text... when using these methods, you can only pass the Parameter
About wrap in. there is no pop-up box in the netweb page. We usually use alert to implement it. The content in alert sometimes requires line breaks. At this time, we should never use \ n to complete the process, use \ n...
Record the page stay time
Pageopen = new date ();
Function stay (){
Pageclose = new date ();
Minutes = (pageclose. getminutes ()-pageopen. getminutes ());
Seconds = (pageclose. getseconds ()-pageopen. getseconds ());
Time = (seconds + (minutes * 60 ));
Trim () in JS ()
By default, JS does not have the trim () attribute. If you want to use it, you have to add it yourself.
The method format for writing a class is as follows: (Str. Trim ();)
<Script language = "JavaScript">
String. Prototype. Trim = function (){
Return this. Replace (/(^ \ s *) | (\ s * $)/g ,"");
}
String. Prototype. ltrim = function (){
Return this. Replace (/(^ \ s *)/g ,"");
}
String. Prototype. rtrim = function (){
Return this. Replace (/(\ s * $)/g ,"");
}
</SCRIPT>
You can write a function as follows: (TRIM (STR ))
<SCRIPT type = "text/JavaScript">
Function trim (STR) {// Delete spaces between the left and right sides
Return Str. Replace (/(^ \ s *) | (\ s * $)/g ,"");
}
Function ltrim (STR) {// Delete the left space
Return Str. Replace (/(^ \ s *)/g ,"");
}
Function rtrim (STR) {// Delete the right space
Return Str. Replace (/(\ s * $)/g ,"");
}
</SCRIPT>