⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ref_a-c.htm

📁 J2EE课程设计资料集合 交你怎么样设计现在流行的J2EE组件开发 JavaScript和servlet开发 怎么样实现页面验证和跳转
💻 HTM
📖 第 1 页 / 共 5 页
字号:
      alert("Anchor does not exist!")
}

</SCRIPT>
<B>Links and Anchors</B>
<FORM>
<P>Click a button to display that anchor in window #2
<P><INPUT TYPE="button" VALUE="0" NAME="link0_button"
   onClick="linkToWindow(this.value)">
<INPUT TYPE="button" VALUE="1" NAME="link0_button"
   onClick="linkToWindow(this.value)">
<INPUT TYPE="button" VALUE="2" NAME="link0_button"
   onClick="linkToWindow(this.value)">
<INPUT TYPE="button" VALUE="3" NAME="link0_button"
   onClick="linkToWindow(this.value)">
<INPUT TYPE="button" VALUE="4" NAME="link0_button"
   onClick="linkToWindow(this.value)">
</FORM>
</BODY>
</htm>
</XMP>

<P>LINK2.htm, which contains the anchors, contains the following code:
<XMP>
<htm>
<HEAD>
<TITLE>Links and Anchors: Window 2</TITLE>
</HEAD>
<BODY>
<A NAME="0"><B>Some numbers</B> (Anchor 0)</A>
<LI>one
<LI>two
<LI>three
<LI>four
<LI>five
<LI>six
<LI>seven
<LI>eight
<LI>nine
<P><A NAME="1"><B>Some colors</B> (Anchor 1)</A>
<LI>red
<LI>orange
<LI>yellow
<LI>green
<LI>blue
<LI>purple
<LI>brown
<LI>black
<P><A NAME="2"><B>Some music types</B> (Anchor 2)</A>
<LI>R&B
<LI>Jazz
<LI>Soul
<LI>Reggae
<LI>Rock
<LI>Country
<LI>Classical
<LI>Opera
<P><A NAME="3"><B>Some countries</B> (Anchor 3)</A>
<LI>Afghanistan
<LI>Brazil
<LI>Canada
<LI>Finland
<LI>India
<LI>Italy
<LI>Japan
<LI>Kenya
<LI>Mexico
<LI>Nigeria
</BODY>
</htm>
</XMP>


<H3>See also</H3>
<LI><A HREF="ref_h-l.htm#link_object" tppabs="http://www.nease.net/~jim/ref_h-l.htm#link_object">link</A> object
<LI><A HREF="ref_a-c.htm#anchor_method" tppabs="http://www.nease.net/~jim/ref_a-c.htm#anchor_method">anchor</A> method


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="anchors_property"><H2>anchors property</H2></A>
<P>An array of objects corresponding to named anchors in source order. See <A HREF="ref_a-c.htm#anchor_object" tppabs="http://www.nease.net/~jim/ref_a-c.htm#anchor_object">anchor</A> object.

<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="appCodeName_property"><H2>appCodeName property</H2></A>
<P>A string specifying the code name of the browser.

<H3>语法</H3>
<PRE>navigator.appCodeName</PRE>

<H3>Property of</H3>
<P><A HREF="ref_m-q.htm#navigator_object" tppabs="http://www.nease.net/~jim/ref_m-q.htm#navigator_object">navigator</A>

<H3>描述</H3>
<P>appCodeName is a read-only property.

<P>
<H3>例子</H3>
<P>The following example displays the value of the appCodeName property:
<PRE>document.write("The value of navigator.appCodeName is " +
   navigator.appCodeName)</PRE>
<P>For Navigator 2.0, this displays the following:
<PRE>The value of navigator.appCodeName is Mozilla</PRE>


<H3>See also</H3>
<LI><A HREF="ref_a-c.htm#appName_property" tppabs="http://www.nease.net/~jim/ref_a-c.htm#appName_property">appName</A>, <A HREF="ref_a-c.htm#appVersion_property" tppabs="http://www.nease.net/~jim/ref_a-c.htm#appVersion_property">appVersion</A>, <A HREF="ref_t-z.htm#userAgent_property" tppabs="http://www.nease.net/~jim/ref_t-z.htm#userAgent_property">userAgent</A> properties
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="appName_property"><H2>appName property</H2></A>
<P>
A string specifying the name of the browser.

<H3>语法</H3>
<PRE>navigator.appName</PRE>

<H3>Property of</H3>
<P><A HREF="ref_m-q.htm#navigator_object" tppabs="http://www.nease.net/~jim/ref_m-q.htm#navigator_object">navigator</A>

<H3>描述</H3>
<P>appName is a read-only property.

<H3>例子</H3>
<P>The following example displays the value of the appName property:
<PRE>document.write("The value of navigator.appName is " +
   navigator.appName)</PRE>
<P>For Navigator 2.0, this displays the following:
<PRE>The value of navigator.appName is Netscape</PRE>

<H3>See also</H3>
<LI><A HREF="ref_a-c.htm#appVersion_property" tppabs="http://www.nease.net/~jim/ref_a-c.htm#appVersion_property">appVersion</A>, <A HREF="ref_a-c.htm#appCodeName_property" tppabs="http://www.nease.net/~jim/ref_a-c.htm#appCodeName_property">appCodeName</A>, <A HREF="ref_t-z.htm#userAgent_property" tppabs="http://www.nease.net/~jim/ref_t-z.htm#userAgent_property">userAgent</A> properties
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="appVersion_property"><H2>appVersion property</H2></A>
<P>
A string specifying version information for the Navigator.

<H3>语法</H3>
<PRE>navigator.appVersion</PRE>

<H3>Property of</H3>
<P><A HREF="ref_m-q.htm#navigator_object" tppabs="http://www.nease.net/~jim/ref_m-q.htm#navigator_object">navigator</A>

<H3>描述</H3>
<P>The appVersion property specifies version information in the following format:
<P><I>releaseNumber</I> (<I>platform</I>; <I>country</I>)
<P>The values contained in this format are the following:
<LI><I>releaseNumber</I> is the version number of the Navigator. For example, "2.0b4" specifies Navigator 2.0, beta 4.
<LI><I>platform</I> is the platform upon which the Navigator is running. For example, "Win16" specifies a 16-bit version of Windows such as Windows 3.11.
<LI><I>country</I> is either "I" for the international release, or "U" for the domestic U.S. release. The domestic release has a stronger encryption feature than the international release.
<P>appVersion is a read-only property.

<H3>例子</H3>
<P><B>Example 1.</B> The following example displays version information for the Navigator:
<PRE>document.write("The value of navigator.appVersion is " +
   navigator.appVersion)</PRE>
<P>For Navigator 2.0 on Windows 95, this displays the following:
<PRE>The value of navigator.appVersion is 2.0 (Win95, I)</PRE>

<P><B>Example 2.</B> The following example populates a textarea object with newline characters separating each line. Because the newline character varies from platform to platform, the example tests the appVersion property to determine whether the user is running Windows (appVersion contains "Win" for all versions of Windows). If the user is running Windows, the newline character is set to \r\n; otherwise, it's set to \n, which is the newline character for Unix and Macintosh.

<XMP>
<SCRIPT>
var newline=null
function populate(textareaObject){
   if (navigator.appVersion.lastIndexOf('Win') != -1)
      newline="\r\n"
      else newline="\n"
   textareaObject.value="line 1" + newline + "line 2" + newline + "line 3"
}
</SCRIPT>
<FORM NAME="form1">
<BR><TEXTAREA NAME="testLines" ROWS=8 COLS=55></TEXTAREA>
<P><INPUT TYPE="button" VALUE="Populate the textarea object"
   onClick="populate(document.form1.testLines)">
</TEXTAREA>
</FORM>
</XMP>

<H3>See also</H3>
<LI><A HREF="ref_a-c.htm#appName_property" tppabs="http://www.nease.net/~jim/ref_a-c.htm#appName_property">appName</A>, <A HREF="ref_a-c.htm#appCodeName_property" tppabs="http://www.nease.net/~jim/ref_a-c.htm#appCodeName_property">appCodeName</A>, <A HREF="ref_t-z.htm#userAgent_property" tppabs="http://www.nease.net/~jim/ref_t-z.htm#userAgent_property">userAgent</A> properties
<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="asin_method"><H2>asin method</H2></A>
<P>
Returns the arc sine (in radians) of a number.

<H3>语法</H3>
<PRE>Math.asin(<I>number</I>)</PRE>
<P><I>number</I> is a numeric expression between -1 and 1, or a property of an existing object.

<H3>用法</H3>
<P><A HREF="ref_m-q.htm#Math_object" tppabs="http://www.nease.net/~jim/ref_m-q.htm#Math_object">Math</A>

<H3>描述</H3>
<P>The asin method returns a numeric value between -pi/2 and pi/2 radians. If the value of <I>number</I> is outside the suggested range, the return value is always 0.

<H3>例子</H3>
<PRE>
// Displays the value 1.570796326794897 (pi/2)
document.write("The arc sine of 1 is " + Math.asin(1))

// Displays the value -1.570796326794897 (-pi/2)
document.write("&ltP&gtThe arc sine of -1 is " + Math.asin(-1))

// Displays the value 0 because the argument is out of range
document.write("&ltP&gtThe arc sine of 2 is " + Math.asin(2))
</PRE>

<H3>See also</H3>
<LI><A HREF="ref_a-c.htm#acos_method" tppabs="http://www.nease.net/~jim/ref_a-c.htm#acos_method">acos</A>, <A HREF="ref_a-c.htm#atan_method" tppabs="http://www.nease.net/~jim/ref_a-c.htm#atan_method">atan</A>, <A HREF="ref_a-c.htm#cos_method" tppabs="http://www.nease.net/~jim/ref_a-c.htm#cos_method">cos</A>, <A HREF="ref_s-s.htm#sin_method" tppabs="http://www.nease.net/~jim/ref_s-s.htm#sin_method">sin</A>, <A HREF="ref_t-z.htm#tan_method" tppabs="http://www.nease.net/~jim/ref_t-z.htm#tan_method">tan</A> methods
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="atan_method"><H2>atan method</H2></A>
<P>
Returns the arc tangent (in radians) of a number.

<H3>语法</H3>
<PRE>Math.atan(<I>number</I>)</PRE>
<P><I>number</I> is either a numeric expression or a property of an existing object, representing the tangent of an angle.

<H3>用法</H3>
<P><A HREF="ref_m-q.htm#Math_object" tppabs="http://www.nease.net/~jim/ref_m-q.htm#Math_object">Math</A>

<H3>描述</H3>
<P>The atan method returns a numeric value between -pi/2 and pi/2 radians.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -