home *** CD-ROM | disk | FTP | other *** search
/ Java Internet Programming Reference Guide / Java Internet Programming Reference Guide.iso / autorun / java.exe / java.DXR / 00131_cans.txt < prev    next >
Encoding:
Text File  |  1980-01-03  |  9.1 KB  |  988 lines

  1. log method
  2.  
  3.  
  4.  
  5. Returns the natural logarithm (base e) of its argument.
  6.  
  7.  
  8.  
  9.  
  10.  
  11. Syntax
  12.  
  13.  
  14.  
  15.  
  16. log(arg)
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. Applies to
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30. Math
  31.  
  32.  
  33.  
  34.  
  35.  
  36. Examples
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43. xxx Examples to be supplied.
  44.  
  45.  
  46.  
  47.  
  48.  
  49. See also
  50.  
  51.  
  52.  
  53.  
  54. exp method
  55.  
  56.  
  57. ------------------------------------------------------------------------
  58.  
  59.  
  60.  
  61.  
  62.  
  63. max method
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. Returns the greater of its two arguments.
  72.  
  73.  
  74.  
  75.  
  76.  
  77. Syntax
  78.  
  79.  
  80.  
  81.  
  82. max(arg1, arg2)
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89. Applies to
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96. Math
  97.  
  98.  
  99.  
  100.  
  101.  
  102. Examples
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109. xxx Examples to be supplied.
  110.  
  111.  
  112.  
  113.  
  114.  
  115. See also
  116.  
  117.  
  118.  
  119.  
  120. min method
  121.  
  122.  
  123. ------------------------------------------------------------------------
  124.  
  125.  
  126.  
  127.  
  128.  
  129. min method
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137. Returns the lesser of its two arguments.
  138.  
  139.  
  140.  
  141.  
  142.  
  143. Syntax
  144.  
  145.  
  146.  
  147.  
  148. min(arg1, arg2)
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155. Applies to
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162. Math
  163.  
  164.  
  165.  
  166.  
  167.  
  168. Examples
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175. xxx Examples to be supplied.
  176.  
  177.  
  178.  
  179.  
  180.  
  181. See also
  182.  
  183.  
  184.  
  185.  
  186. max method
  187.  
  188.  
  189. ------------------------------------------------------------------------
  190.  
  191.  
  192.  
  193.  
  194.  
  195. open method
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203. For the window object, opens a new web browser window. xxx For the document object, description to be supplied.
  204.  
  205.  
  206.  
  207.  
  208.  
  209. Syntax
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216. The first form of the syntax is for the document object; the second form is for window.
  217. 1. document.open("MIME type")
  218. 2. window.open("URL", "windowName", ["windowFeatures"])
  219.  
  220.  
  221.  
  222.  
  223. URL specifies the URL to open in the new window.
  224.  
  225. windowName specifies a name for the window object being opened.
  226.  
  227. windowFeatures is a comma-separated list of any of the following options and values:
  228.  
  229.    toolbar[=yes|no]|[=1|0]
  230.    location[=yes|no]|[=1|0]
  231.    directories[=yes|no]|[=1|0]
  232.    status[=yes|no]|[=1|0]
  233.    menubar[=yes|no]|[=1|0]
  234.    scrollbars[=yes|no]|[=1|0]
  235.    resizable[=yes|no]|[=1|0]
  236.    copyhistory[=yes|no]|[=1|0]
  237.    width=pixels
  238.    height=pixels
  239.  
  240.  
  241.  
  242.  
  243. You may use any subset of these options.  Separate options with a comma.
  244. Do not put spaces between the options.
  245.  
  246.  
  247. pixels is a positive integer specifying the dimension in pixels.
  248.  
  249.  
  250.  
  251. NOTE:
  252. In event handlers, you must specify window.open() unless you want to call document.open()
  253. because of the scoping of static objects in JavaScript.
  254.  
  255.  
  256.  
  257.  
  258.  
  259. Description for window
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266. The open method opens a new web browser window on the client, similar to choosing File|New Web Browser from the menu of the Navigator. The URL argument specifies the URL contained by the new window. If URL is an empty string, a new, empty window is created.
  267.  
  268.  
  269.  
  270. windowFeatures is an optional, comma-separated list of options for the new window. The boolean windowFeatures options are set to true if they are specified without values, or as yes or 1. For example, open("", "messageWindow", "toolbar") and open("", "messageWindow", "toolbar=1") both set the toolbar option to true. If windowName does not specify an existing window and you do not specify windowFeatures, all boolean windowFeatures are true by default.
  271.  
  272.  
  273.  
  274. Following is a description of the windowFeatures:
  275. toolbar creates the standard Navigator toolbar, with buttons such as "Back" and "Forward", if true
  276. location creates a Location entry field, if true
  277. directories creates the standard Navigator directory buttons, such as "What's New" and "What's Cool", if true
  278. status creates the status bar at the bottom of the window, if true
  279. menubar creates the menu at the top of the window, if true
  280. scrollbars creates horizontal and vertical scrollbars when the document grows larger than the window dimensions, if true
  281. resizable allows a user to resize the window, if true
  282. copyhistory gives the new window the same session history as the current window, if true
  283. width specifies the width of the window in pixels
  284. height specifies the height of the window in pixels
  285.  
  286.  
  287.  
  288.  
  289.  
  290. Description for document
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297. Description to be supplied.
  298.  
  299.  
  300.  
  301.  
  302.  
  303. Applies to
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310. document, window
  311.  
  312.  
  313.  
  314.  
  315.  
  316. Examples
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323. In the following example, the windowOpener function opens a window and uses write methods to display a message:
  324. function windowOpener() {
  325.    msgWindow=open("","Display window","toolbar=no,directories=no,menubar=no");
  326.    msgWindow.document.write("<HEAD>ltTITLE>Message window<TITLE>lt/HEAD>);
  327.    msgWindow.document.write("<CENTER>ltBIG>ltB>Hello, world!<B>lt/BIG>lt/CENTER>);
  328. }
  329.  
  330.  
  331.  
  332.  
  333.  
  334. The following is an onClick event handler that opens a new client window displaying
  335. the content specified in the file sesame.html.
  336. It opens it with the specified option settings and
  337. names the corresponding window object newWin.
  338.  
  339.  
  340.  
  341.  
  342.  
  343. <FORM NAME="myform">
  344. <INPUT TYPE="button" NAME="Button1" VALUE="Open Sesame!" 
  345. onClick="window.open('sesame.html', 'newWin', 
  346. 'toolbar=no,directories=no,menubar=no,status=yes,width=300,height=300')">
  347. </form>
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357. Notice the use of single quotes (') inside the onClick event handler.
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364. See also
  365.  
  366.  
  367.  
  368.  
  369. close method
  370.  
  371.  
  372. ------------------------------------------------------------------------
  373.  
  374.  
  375.  
  376.  
  377.  
  378. parse method
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387. Syntax
  388.  
  389.  
  390.  
  391.  
  392. Date.parse(date string)
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399. Description
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407. The parse function takes a date string (such as "Dec 25, 1995"), and returns the number
  408. of milliseconds since January 1, 1970 00:00:00 (local time).
  409. This function is useful for setting date values based on string values,
  410. for example in conjunction with the setTime method.
  411.  
  412.  
  413.  
  414. Given a string representing a time, parse returns the time value. It accepts 
  415. the IETF standard date syntax: "Mon, 25 Dec 1995 13:30:00 GMT". 
  416. It understands the continental US time zone abbreviations, but for general use, 
  417. use a time zone offset, for example "Mon, 25 Dec 1995 13:30:00 GMT+0430" 
  418. (4 hours, 30 minutes west of the Greenwich meridian). If you do not specify a time zone,
  419. the local time zone is assumed. GMT and UTC are considered equivalent. 
  420.  
  421.  
  422.  
  423.  
  424. The parse function is a static method of Date.  That means that you always use it as
  425. Date.parse(), rather than as a method of a date object you created.
  426.  
  427.  
  428.  
  429.  
  430.  
  431. Applies to
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438. Date
  439.  
  440.  
  441.  
  442.  
  443.  
  444. Examples
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452. If IPOdate is an existing date object, then 
  453.  
  454. IPOdate.setTime(Date.parse("Aug 9, 1995"))
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462. See also
  463.  
  464.  
  465.  
  466.  
  467. UTC method
  468.  
  469.  
  470. ------------------------------------------------------------------------
  471.  
  472.  
  473.  
  474.  
  475.  
  476. pow method
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484. Returns arg1 to the arg2 power, i.e. arg1arg2.
  485.  
  486.  
  487.  
  488.  
  489.  
  490. Syntax
  491.  
  492.  
  493.  
  494.  
  495. pow(arg1, arg2)
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502. Applies to
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509. Math
  510.  
  511.  
  512.  
  513.  
  514.  
  515. Examples
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522. xxx Examples to be supplied.
  523.  
  524.  
  525.  
  526.  
  527.  
  528. See also
  529.  
  530.  
  531.  
  532.  
  533. sqrt method
  534.  
  535.  
  536. ------------------------------------------------------------------------
  537.  
  538.  
  539.  
  540.  
  541.  
  542. prompt method
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550. Displays an Prompt dialog box with a message and an input field
  551.  
  552.  
  553.  
  554.  
  555.  
  556. Syntax
  557.  
  558.  
  559.  
  560.  
  561. prompt(message, input default)
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568. Description
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575. Use the prompt method to display a dialog box that takes user input.
  576. The arguments, message and input default are
  577. JavaScript values to be displayed as the message and the default value in the input field, respectively.
  578.  
  579.  
  580.  
  581.  
  582.  
  583. Applies to
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590. window
  591.  
  592.  
  593.  
  594.  
  595.  
  596. Examples
  597.  
  598.  
  599.  
  600.  
  601.  
  602. prompt("Enter the number of doughnuts you want:", 12)
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610. See also
  611.  
  612.  
  613.  
  614.  
  615. alert, confirm methods
  616.  
  617.  
  618. ------------------------------------------------------------------------
  619.  
  620.  
  621.  
  622.  
  623.  
  624. random method
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632. Returns a pseudo-random number between zero and one. xxx NYI.
  633.  
  634.  
  635.  
  636.  
  637.  
  638. Syntax
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645. xxx To be supplied.
  646.  
  647.  
  648.  
  649.  
  650.  
  651. Applies to
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658. Math
  659.  
  660.  
  661.  
  662.  
  663.  
  664. Examples
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671. xxx Examples to be supplied.
  672.  
  673.  
  674. ------------------------------------------------------------------------
  675.  
  676.  
  677.  
  678.  
  679.  
  680. round method
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688. Returns its argument, rounded to the nearest integer. In other words, if its argument is n.5 or greater (where n is an integer), returns n+1, otherwise returns n.
  689.  
  690.  
  691.  
  692.  
  693.  
  694. Syntax
  695.  
  696.  
  697.  
  698.  
  699. round(arg)
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706. Applies to
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713. Math
  714.  
  715.  
  716.  
  717.  
  718.  
  719. Examples
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726. xxx Examples to be supplied.
  727.  
  728.  
  729. ------------------------------------------------------------------------
  730.  
  731.  
  732.  
  733.  
  734.  
  735. select method
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743. For password, text, and textArea, selects the input area of the object.
  744.  
  745.  
  746.  
  747.  
  748.  
  749. Syntax
  750.  
  751.  
  752.  
  753.  
  754. select()
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761. Description
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768. Use the select method to highlight the input area of a form element. You can use the select method with the focus method to highlight a field and position the cursor for a user response.
  769.  
  770.  
  771.  
  772.  
  773.  
  774. Applies to
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781. password, text, textArea
  782.  
  783.  
  784.  
  785.  
  786.  
  787. Examples
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794. In the following example, the checkPassword function confirms that a user has entered a valid password. If the password is not valid, the select method highlights the password field and focus method returns focus to it so the user can re-enter the password.
  795.  
  796. function checkPassword(userPass) {
  797.    if (badPassword) {
  798.       alert("Please enter your password again.")
  799.       userPass.focus()
  800.       userPass.select()
  801.    }
  802. }
  803.  
  804. This example assumes that the password is defined as:
  805. <INPUT TYPE=password NAME=userPass>/PRE>
  806.  
  807.  
  808.  
  809.  
  810.  
  811. See also
  812.  
  813.  
  814.  
  815.  
  816. blur, focus methods
  817.  
  818.  
  819. ------------------------------------------------------------------------
  820.  
  821.  
  822.  
  823.  
  824.  
  825. setDate method
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834. Syntax
  835.  
  836.  
  837.  
  838.  
  839. dateObj.setDate(day)
  840.  
  841.  
  842.  
  843. where dateObj is a date object.
  844.  
  845.  
  846.  
  847.  
  848.  
  849. Description
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857. Sets the day of the month for the date object.
  858. The argument is an integer from 1 to 31.
  859.  
  860.  
  861.  
  862.  
  863.  
  864. Applies to
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871. Date
  872.  
  873.  
  874.  
  875.  
  876.  
  877. Examples
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885. The second statement below changes the day for theBigDay to the 24th of July from its original value.
  886.  
  887. theBigDay = new Date("July 27, 1962 23:30:00")
  888. Xmas95.setDate(24)
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897. See also
  898.  
  899.  
  900.  
  901.  
  902. xxx To be supplied.
  903.  
  904.  
  905. ------------------------------------------------------------------------
  906.  
  907.  
  908.  
  909.  
  910.  
  911. setHours method
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920. Syntax
  921.  
  922.  
  923.  
  924.  
  925. dateObj.setHours(hours 
  926.  
  927.  
  928.  
  929. where dateObj is a date object.
  930.  
  931.  
  932.  
  933.  
  934.  
  935. Description
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943. Sets the hours in the current time.
  944. The argument is an integer between 0 and 23.
  945.  
  946.  
  947.  
  948.  
  949.  
  950. Applies to
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957. Date
  958.  
  959.  
  960.  
  961.  
  962.  
  963. Examples
  964.  
  965.  
  966.  
  967.  
  968.  
  969. theBigDay.setHours(7)
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977. See also
  978.  
  979.  
  980.  
  981.  
  982. xxx To be supplied.
  983.  
  984.  
  985. ------------------------------------------------------------------------
  986.  
  987.  
  988.