📄 js_examples_2.asp@output=print
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JavaScript Examples</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />
<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</head>
<body>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
<h1>JavaScript Objects Examples</h1>
<a href="js_examples.asp"><img alt="previous" border="0" src="../images/btn_previous.gif" /></a>
<a href="js_examples_3.asp"><img alt="next" border="0" src="../images/btn_next.gif" /></a>
<hr />
<p class="intro">Examples of using the built-in JavaScript objects.</p>
<hr />
<h2>String Object</h2>
<p>
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_length_string">Return the length of a string</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_str_style">Style strings</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_indexof">Return the position of the first occurrence of a text in a string - indexOf()</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_match">Search for a text in a string and return the text if found - match()</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_replace">Replace characters in a string - replace()</a>
</p>
<p>More String object examples in our <a href="../jsref/jsref_obj_string.asp">JavaScript reference</a>.</p>
<h2>Date Object</h2>
<p>
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_date">Use Date() to return today's date and time</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_gettime">Use getTime() to calculate the years since 1970</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_setfullyear2">Use setFullYear() to set a specific date</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_toutcstring">Use toUTCString() to convert today's date (according to UTC) to a string</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_date_weekday">Use getDay() and an array to write a weekday, and not just a number</a><br />
<a target="_blank" href="tryit.asp@filename=tryjs_timing_clock">Display a clock</a>
</p>
<p>More Date object examples in our <a href="../jsref/jsref_obj_date.asp">JavaScript reference</a>.</p>
<h2>Array Object</h2>
<p>
<a target="_blank" href="tryit.asp@filename=tryjs_array">Create an array</a><br />
<a target="_blank" href="tryit.asp@filename=tryjs_array_for_in">Use a for...in statement to loop through the elements of an array</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_concat">Join two arrays - concat()</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_join">Put array elements into a string - join()</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_sort">Literal array - sort()</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_sort2">Numeric array - sort()</a><br />
</p>
<p>More Array object examples in our <a href="../jsref/jsref_obj_array.asp">JavaScript reference</a>.</p>
<h2>Boolean Object</h2>
<p>
<a target="_blank" href="tryit.asp@filename=tryjs_boolean">Check Boolean value</a>
</p>
<p>More Boolean object examples in our <a href="../jsref/jsref_obj_boolean.asp">JavaScript reference</a>.</p>
<h2>Math Object</h2>
<p>
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_round">Use round() to round a number</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_random">Use random() to return a random number between 0 and 1</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_max">Use max() to return the number with the highest value of two specified numbers</a><br />
<a target="_blank" href="../jsref/tryit.asp@filename=tryjsref_min">Use min() to return the number with the lowest value of two specified numbers</a><br />
<a target="_blank" href="tryit.asp@filename=tryjs_celsius">Convert Celsius to Fahrenheit</a>
</p>
<p>More Math object examples in our <a href="../jsref/jsref_obj_math.asp">JavaScript reference</a>.</p>
<hr />
<a href="js_examples.asp"><img alt="previous" border="0" src="../images/btn_previous.gif" /></a>
<a href="js_examples_3.asp"><img alt="next" border="0" src="../images/btn_next.gif" /></a>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -