String
String :
var _ = new String (" _ ")
var _ = "_"
String:length ( ) ; prototype (), , .
: . myFunc.
<!-- pr17 -->
<html>
<head>
<title> </title>
</head>
<body>
<SCRIPT type="text/javaScript">
function myFunc() {
return "";
}
String.prototype.myName= myFunc;
var mystring=new String("")
mystring += " - " + mystring.myName();
document.write (mystring);// -
</script>
</body>
</html>
String:
big (), small () <big> <small>
bold ()/italics () <bold>/<i>
fixed () <tt>
fontcolor (), fontsize () <font> , ,
link (-) , ,
charCodeAt ( ) , , Unicode,
fromCharCode ( Unicode, ) , , Unicode- . .
concat ( , ) ,
charAt ( ) ,
indexOf (, ) . , , , .
lastIndexOf (, ) , indexOf, . .., .
slice ( , ) . , . .
split (, ) , , . -, , . , , .
substr ( , ) , . , ,
substring ( , ) - ,
toLowerCase ()/toUpperCase () /
toString () .
Array
Array: length ; prototype , .
Array: concat ( ) , - , . join (-) , , ;
pop () . , undefined;
shift () ;
unshift ( ) , , , ;
push ( ) , , . .
reverse () , ;
sort ( ) , . : 1, , -1, , 0, . , .
slice ( , ) , , . , .
splice ( , , , )
Number ()
Number
MAX_VALUE , 1.7976931348623157+308.
MIN_VALUE , 5-324.
NEGATIVE_INFINITY - , , Number.MIN_VALUE.
POSITIVE_INFINITY - , , Number.MAX_VALUE.
NaN , NaN (Not a Number).
prototype , , String.
Number
toExponential () - ;
toFixed () - ;
toString () - .
Math ()
Math (Math.)
E - ,
LN10 - 10,
LN2 - 2,
LOG10E - ( ),
LOG2E - ,
PI - ,
SORT1_2 - 1/2,
SORT2 - 2.
Math (Math. ())
bs () ( ) ;
s () ;
asin () ;
atan () ;
atan2(x, ) ( , );
cos () ;
sin() ;
tan () .
round () ;
ceil () ;
floor () ;
() ;
log () ;
max (1,2) : 1 2;
min (1,2) : 1 2;
pow (1,2) 1 2;
sqrt() ;
random() 0 1;
: alert(Math.pow(10,3)); // 1000
<!-- pr18: -->
<html>
<head>
<title> </title>
</head>
<body>
<script type="text/javascript">
function sq(r) {
document.write(" r= ", r," .","<BR>")
return Math.PI*r * r;
}
var r=2;
document.write(" ",sq(r),".")
</script>
</body> </html>
Date ()
Date . Date . Date , 1 1970 . , .
Date :
= new Date([, , , , , , ])
Date
getFullYear() ( 1970-..)
getYear() ( 70-
getMonth() (0-11)
getDate() (1-31)
getDay() (0-6)
getHours() (0-23)
getMinutes() (0-59)
getSeconds() (0-59)
getTime() -
getMilliseconds() -
getUTCFullYear() UTC (1970- )
getUTCMonth() UTC
getUTCDate() UTC
getUTCDay() UTC
getUTCHours() UTC
getUTCMinutes() UTC
getUTCSeconds() UTC
getUTCMilliseconds() UTC
setYear()
setFullYear() -
setMonth() -
setDate() -
setDay() - ( 0-6)
setHours() -
setMinutes() -
setSeconds() -
setMilliseconds() -
setTime() -
setUTCFullYear() UTC
setUTCMonth()
setUTCDate()
setUTCDay()
setUTCHours()
setUTCMinutes()
setUTCSeconds()
setUTCMilliseconds()
getTimezoneOffset () UTC
toDateString() - ( )
toGMTString() -
toLocaleDateString() -
toLocaleString()
toString() -
<!-- pr19:. Date-->
<html> <head>
<title>Clock</title>
<script type="text/JavaScript">
function clockform()
{d=new Date();
time=d.getHours()+":"+d.getMinutes()+":"+d.getSeconds();
document.formcl.fclock.value=time;
setTimeout("clockform()",100); }
</script>
</head>
<body onLoad="clockform()">
<center>
<form name=formcl metod="get">
<input name=fclock maxlength=8 size=8>
</form> </center>
</body></html>
Function ()
_ = new Function ( , )
{ }
:
arguments , . 0. Array ( , length). length ,
caller , ; , null
:
toString() .