本节描述htp,htf和owa_util包中的每个过程和函数。注意:每个生成的HTML标记的
htp过程,存在与之相应的带标志参数的htf函数。注意:定为缺省的参数不需要传递。
每个过程和函数的描述分为以下几部分:
名称 | 过程或函数的名称 |
语法 | 过程或函数的实际语法 |
目的 | 过程或函数做什么 |
参数 | 传入的参数 |
结果 | 过程或函数生成什么 |
所有传给超文本过程或函数的参数都是varchar2(可变长字符串), 整数或日期类型的。数据类型用参数名的第一个字母表示,"c"表示字符(varchar2), "n" 表示整数,"d" 表示日期。例如:
其中 cname 是字符型
其中 nsize 是整数型
其中dbuf 是日期字段
注意: 很多HTML 3.0标记有大量的可选属性, 如果超文本过程和函数的的参数都作成独立的回使得调用相当繁琐。另外,很多浏览器支持非标准属性。因此,每个生成HTML标记的超文本过程和函数都在最后有个参数cattributes, 一个可选参数. 这个参数使你把想要的HTML属性作为额外的文本传给PL/SQL过程。
例如, htp.em 的语法为:
htp.em (ctext, cattributes);
一个使用HTML 3.0属性的调用可能象下面的样子:
htp.em('This is an example','ID="SGML_ID" LANG="en"');
此行将残生下面的内容:
<EM ID="SGML_ID" LANG="en">This is an example</EM>
The following print procedures are used in conjunction with htf functions to generate a line in the HTML document being constructed. They can also be passed hard-coded text that will appear in the HTML document as-is. The generated line is passed to the Web Agent which sends it to standard output. As documented in the CGI 1.1 specification, the Oracle Web Listener takes the contents of standard output and returns it to the Web browser that requested the dynamic HTML document.
语法 | htp.print (cbuf | dbuf | nbuf); |
作用 | generates a line in an HTML document. |
参数 | cbuf in varchar2 or dbuf in date or nbuf in number |
Generates | Generates a line in an HTML document based on the value passed to it. |
Alias for htp.print
语法 | htp.prn (cbuf | dbuf | nbuf); |
作用 | Just like htp.print, but doesn't put a new line at the end of the value submitted. |
语法 | htp.prints (ctext); |
作用 | Generates a line in an HTML document and replaces all occurrences of the following special characters with escape characters. If not replaced, the special characters would be interpreted as HTML control characters, and would produce garbled output. |
`<` with '<` `>' with >` `"` with `"` `&` with `&` |
|
参数 | ctext in varchar2 |
Generates | Generates a line in an HTML document based on the value passed to it. This procedure is the same as htp.print or htp.p but first replaces the special characters listed above with escape characters. |
Alias for htp.prints
The following tags are used to identify the major parts of an HTML document.
Note: Although this section shows hypertext procedures (HTP), all of them are also available as hypertext functions (HTF).
语法 | htp.htmlOpen; |
作用 | Prints a tag that indicates the beginning of an HTML document |
参数 | none |
Generates | <HTML> |
语法 | htp.htmlClose; |
作用 | Prints a tag that indicates the end of an HTML document |
参数 | none |
Generates | </HTML> |
语法 | htp.headOpen; |
作用 | Prints a tag that indicates the beginning of the HTML document head |
参数 | none |
Generates | <HEAD> |
语法 | htp.headClose; |
作用 | Prints a tag that indicates the end of the HTML document head |
参数 | none |
Generates | </HEAD> |
语法 | htp.bodyOpen (cbackground, cattributes); |
作用 | Prints the tag that identifies the beginning of the body of an HTML document, and allows you to specify an image as the background of the document |
参数 | cbackground in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <BODY background="cbackground" cattributes> |
Note: If cbackground and cattributes are NULL, this tag generates <BODY>.
Example | htp.bodyOpen ('/img/background.gif'); This line produces: <BODY background="background.gif"> |
语法 | htp.bodyClose; |
作用 | Defines the end of the HTML document body |
参数 | none |
Generates | </BODY> |
The following procedure tags should be placed between the htp.headOpen and htp.headClose procedure tags.
Note: Although this section shows hypertext procedures (HTP), all of them are also available as hypertext functions (HTF).
语法 | htp.title (ctitle); |
作用 | Prints an HTML tag with the text you pass in as the value of TITLE. Most Web Browsers display the text value enclosed between <TITLE> and </TITLE> at the top of the document viewing window. |
参数 | ctitle in varchar2 |
Generates | <TITLE>ctitle</TITLE> |
语法 | htp.htitle (ctitle, nsize, calign, cnowrap, cclear, cattributes); |
作用 | Prints the HTML tags for both the title and a top heading using the title you specify. |
参数 | ctitle in varchar2 nsize in integer DEFAULT 1 calign in varchar2 DEFAULT NULL cnowrap in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <TITLE>ctitle</TITLE><Hnsize ALIGN="calign" NOWRAP CLEAR="cclear" cattributes>ctitle</Hnsize> |
Note that htp.htitle produces non-standard HTML. However, most Web Browsers accept it. To produce standard HTML, the <TITLE> tag must be in the HEAD section of the page, and the level heading tag (<H | n>) must be in the BODY section. For example: htp.headOpen; htp.title(...); htp.headClose; htp.bodyOpen; htp.header (1,...)); ... |
语法 | htp.base; |
作用 | Prints an HTML tag that records the URL of the document |
参数 | none |
Generates | Inserts absolute pathname of current document. |
语法 | htp.isindex (cprompt, curl); |
作用 | Creates a single entry field with a prompting text, such as "enter value," then sends that value to the URL of the page or program. |
参数 | cprompt in varchar2 DEFAULT NULL curl in varchar2 DEFAULT NULL |
Generates | <ISINDEX PROMPT="cprompt" HREF="curl"> |
语法 | htp.linkRel (crel, curl, ctitle); |
作用 | Prints the HTML tag that gives the relationship described by the hypertext link from the anchor to the target. This is only used when the HREF attribute is present. This tag indicates a relationship between documents, but does not create a link. To do that, use htp.anchor. |
参数 | crel in varchar2 curl in varchar2 ctitle in varchar2 DEFAULT NULL |
Generates | <LINK REL="crel" HREF="curl" TITLE="ctitle"> |
语法 | htp.linkRev (crev, curl, ctitle); |
作用 | Gives the relationship described by the hypertext link from the target to the anchor. This is the opposite of htp.linkRel. This tag indicates a relationship between documents, but does not create a link. To do that, use htp.anchor. |
参数 | crev in varchar2 curl in varchar2 ctitle in varchar DEFAULT NULL |
Generates | <LINK REV="crev" HREF="curl" TITLE="ctitle"> |
作用 | htp.meta (chttp_equiv, cname, ccontent); |
Prints an HTML tag that identifies and embeds document meta-information that supplies the Web browser with information about the objects returned in HTTP. | |
参数 | chttp_equiv in varchar2 cname in varchar2 ccontent in varchar2 |
Generates | <META HTTP-EQUIV="chttp_equiv"
NAM ="cname" CONTENT="ccontent"> |
Example | htp.meta ('Refresh', NULL, 120); This line produces: <META HTTP-EQUIV="Refresh" CONTENT=120> |
which on some Web browsers will cause the current URL to be reloaded automatically every 120 seconds. |
Body tags are used in the main text of your HTML page. They can format a paragraph, allow you to add hidden comments to your text, and add images within the body of your HTML text.
Note: Although this section shows hypertext procedures (HTP), all of them are also available as hypertext functions (HTF).
语法 | htp.line (cclear, csrc, cattributes); |
作用 | Prints the HTML tag that generates a line in the HTML document. csrc enables you to specify a custom image as the source of the line. |
参数 | cclear in varchar2 DEFAULT NULL csrc in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <HR CLEAR="cclear" CSRC="csrc" cattributes> |
Alias for htp.line
语法 | htp.nl (cclear, cattributes); |
作用 | Prints the HTML tag that inserts a new line |
参数 | cclear in varchar2 DEFAULT NULL, cattributes in varchar2 DEFAULT NULL, |
Generates | <BR CLEAR="cclear" cattributes> |
Alias for htp.nl
语法 | htp.header (nsize, cheader, calign, cclear, cattributes); |
作用 | Prints the HTML tag for a heading level, with the value of the heading level assigned in the nsize parameter. Valid levels are 1 through 6. |
参数 | nsize in integer cheader in varchar2 calign in varchar2 DEFAULT NULL cnowrap in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <Hnsize ALIGN="calign" NOWRAP CLEAR="cclear" cattributes>cheader</Hnsize> |
Example | htp.header (1,'Overview'); produces <H1>Overview</H1> |
语法 | htp.anchor (curl, ctext, cname, cattributes); |
作用 | Prints the HTML tag for an anchor to be the start or end destination of a hypertext link. This anchor can accept several attributes, but either HREF or NAME is required. HREF specifies where to link to. NAME allows this tag to be a target of a hypertext link. |
参数 | curl in varchar2 ctext in varchar2 cname in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <A HREF="curl" NAME="cname" cattributes>ctext</A> |
语法 | htp.mailto (caddress, ctext, cname, cattributes); |
作用 | Prints the HTML tag for an anchor with 'mailto' concatenated ahead of the mail address argument. |
参数 | caddresss in varchar2 ctext in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <A HREF="mailto:caddress" cattributes>ctext</A> |
Example | htp.mailto('pres@white_house.gov','Send Email to the President'); prints <A HREF="mailto:pres@white_house.gov">Send Email to the President</A> |
语法 | htp.img (curl, calign, calt, cismap, cattributes); |
作用 | Prints an HTML tag that signals the browser to load an image to be placed into the HTML page. ALT allows you to specify alternate text to be shown while the image is being loaded, or instead of the image if the browser does not support images. The ISMAP attribute indicates that the image is an image map. |
参数 | curl in varchar2 DEFAULT NULL calign in varchar2 DEFAULT NULL calt in varchar2 DEFAULT NULL cismap in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <IMG SRC="curl" ALIGN="calign" ALT="calt" ISMAP cattributes> |
语法 | htp.para; |
作用 | Prints an HTML tag that indicates that the text previous to it should be formatted as a paragraph. |
参数 | none |
Generates | <P> |
语法 | htp.paragraph (calign, cnowrap, cclear, cattributes); |
作用 | Prints the same HTML tag as htp.para except that 参数 pass in exact alignment, leading, wrapping , and attributes. |
参数 | calign in varchar2 DEFAULT NULL cnowrap in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <P ALIGN="calign" NOWRAP CLEAR="cclear" cattributes> |
语法 | htp.address (cvalue, cnowrap, cclear, cattributes); |
作用 | Prints an HTML tag that enables you to specify address, author and signature of document |
参数 | cvalue in varchar2 cnowrap in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <ADDRESS CLEAR="cclear" NOWRAP cattributes>cvalue</ADDRESS> |
语法 | htp.comment (ctext); |
作用 | Prints an HTML tag that allows you to store comments or lines in HTML pages. These comments are not visible to the end user. |
参数 | ctext in varchar2 |
Generates | <!-- ctext --> |
语法 | htp.preOpen (cclear, cwidth, cattributes); |
作用 | Prints an HTML tag that indicates the beginning of preformatted text in the body of the HTML page. |
参数 | cclear in varchar2 DEFAULT NULL cwidth in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
<PRE CLEAR="cclear" WIDTH="cwidth" cattributes> |
语法 | htp.preClose; |
作用 | Prints an HTML tag that ends the preformatted section of text. |
参数 | none |
Generates | </PRE> |
语法 | htp.blockquoteOpen (cnowrap, cclear, cattributes); |
作用 | Prints an HTML tag that precedes a paragraph of quoted text. |
参数 | cnowrap in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL; |
Generates | <BLOCKQUOTE CLEAR="cclear" NOWRAP cattributes> |
语法 | htp.blockquoteClose; |
作用 | Ends the <BLOCKQUOTE> section of quoted text. |
参数 | none |
Generates | </BLOCKQUOTE> |
List tags allow you to display information in any of the following ways:
Note: All the hypertext procedures (HTP) shown in this section are also available as hypertext functions (HTF).
语法 | htp.listHeader (ctext, cattributes); |
作用 | Prints an HTML tag at the beginning of the list |
参数 | ctext in varchar2 cattributes in varchar2 DEFAULT NULL |
Generates | <LH cattributes>ctext</LH> |
语法 | htp.listItem (ctext, cclear, cdingbat, csrc, cattributes); |
作用 | Prints an HTML tag that formats a listed item. |
参数 | ctext in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cdingbat in varchar2 DEFAULT NULL csrc in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <LI CLEAR="cclear" DINGBAT="cdingbat" SRC="csrc" cattributes>ctext |
语法 | htp.ulistOpen (cclear, cwrap, cdingbat, csrc, cattributes); |
作用 | Prints an HTML tag that is used to open an unordered list that presents listed items separated by white space and marked off by bullets. |
参数 | cclear in varchar2 DEFAULT NULL cwrap in varchar2 DEFAULT NULL cdingbat in varchar2 DEFAULT NULL csrc in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <UL CLEAR="cclear" WRAP="cwrap" DINGBAT="cdingbat" SRC="csrc" cattributes> |
语法 | htp.ulistClose; |
作用 | Prints an HTML tag that ends the unordered list. |
参数 | none |
Generates | </UL> |
语法 | htp.olistOpen (cclear, cwrap, cattributes); |
作用 | Prints an HTML tag that is used to open an ordered list that presents listed items marked off with numbers. |
参数 | cclear in varchar2 DEFAULT NULL cwrap in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <OL CLEAR="cclear" WRAP="cwrap" cattributes> |
语法 | htp.olistClose; |
作用 | Prints an HTML tag that ends an ordered list. |
参数 | none |
Generates | </OL> |
语法 | htp.dlistOpen (cclear, cattributes); |
作用 | Prints an HTML tag that starts a definition list |
参数 | cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <DL CLEAR="cclear" cattributes> |
语法 | htp.dlistClose |
作用 | Prints an HTML tag that Ends a definition list |
参数 | none |
Generates | </DL> |
语法 | htp.dlistDef (ctext, cclear, cattributes); |
作用 | Prints an HTML tag that is used to insert terms, and their corresponding definitions in an indented list format. The htp.dlistTerm must immediately follow this tag. |
参数 | ctext in varchar2 DEFAULT NULL clear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <DD CLEAR="cclear" cattributes>ctext |
语法 | htp.dlistTerm (ctext, cclear, cattributes); |
作用 | Prints an HTML tag used to insert the definition term inside the definition list. This tag must immediately follow the htp.dlistDef. |
参数 | ctext in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <DT CLEAR="cclear" cattributes>ctext |
语法 | htp.menulistOpen; |
作用 | Prints an HTML tag that begins a list that presents one line per item, and appears more compact than an unordered list. The htp.listItem will follow this tag. |
参数 | none |
Generates | <MENU> |
语法 | htp.menulistClose; |
作用 | Prints an HTML tag that ends a menu list. |
Paramenters | none |
Generates | </MENU> |
语法 | htp.dirlistOpen; |
作用 | Prints an HTML tag that begins a directory list. This presents information in a list of items that contain up to 20 characters. Items in this list are typically arranged in columns, typically 24 characters wide. The <LI> or htp.listItem must appear directly after you use this tag. |
参数 | none |
Generates | <DIR> |
语法 | htp.dirlistClose; |
作用 | Prints an HTML tag that closes the directory list tag, htp.dirlistOpen. |
参数 | none |
Generates | </DIR> |
The character format tags are used to specify or alter the appearance of the marked text. Character format tags have opening and closing elements, and affect only the text that they surround.
Character format tags give hints to the browser as to how a character or character string should appear, but each browser determines its actual appearance. Essentially, they place text into categories such that all text in a given category is given the same special treatment, but the browser determines what that treatment is. For example, the HTML string <STRONG>Here is some text</STRONG> might appear as bold in some browsers, or might flash instead.
If a specific text attribute, such as bold is desired, a physical format tag may be necessary. See the section, "Physical Format Tags," for more information.
Note: All the hypertext procedures (HTP) shown in this section are also available as hypertext functions (HTF).
语法 | htp.cite (ctext, cattributes); |
作用 | Prints a pair of HTML tags that specify the text they surround as a citation. Usually rendered as italics. |
参数 | ctext in varchar2 cattributes in varchar2 DEFAULT NULL |
Generates | <CITE cattributes>ctext</CITE> |
语法 | htp.code (ctext, cattributes); |
作用 | Prints a pair of HTML tags that specify the text they surround as an example of code output. Usually rendered in monospace format, e.g. Courier. |
参数 | ctext in varchar2 cattributes in varchar2 DEFAULT NULL |
Generates | <CODE cattributes>ctext</CODE> |
语法 | htp.emphasis (ctext, cattributes); |
作用 | Prints a pair of HTML tags that specify the text they surround as requiring typographic emphasis. This tag is equivalent to htp.em. Usually rendered as italics. |
参数 | ctext in varchar2 cattributes in varchar2 DEFAULT NULL |
Generates | <EM cattributes>ctext</EM> |
Alias for htp.emphasis
语法 | htp.keyboard (ctext, cattributes); |
作用 | Prints a pair of HTML tags that specify the text they surround as text typed in by the user.,which is usually rendered as monospace. This tag is equivalent to htp.kbd. |
参数 | ctext in varchar2 cattributes in varchar2 DEFAULT NULL |
Generates | <KBD cattributes>ctext</KBD> |
Alias for htp.keyboard
语法 | htp.sample (ctext, cattributes); |
作用 | Prints a pair of HTML tags that specify the text they surround as a sequence of literal characters that must be typed in the exact sequence in which they appear. Usually rendered as monospace font. |
参数 | ctext in varchar2 cattributes in varchar2 DEFAULT NULL |
Generates | <SAMP cattributes>ctext</SAMP> |
语法 | htp.strong (ctext, cattributes); |
作用 | Prints a pair of HTML tags that specify the text they surround as needing strong typographic emphasis. Usually rendered as bold. |
参数 | ctext in varchar2 cattributes in varchar2 DEFAULT NULL |
Generates | <STRONG cattributes>ctext</STRONG> |
语法 | htp.variable (ctext, cattributes); |
作用 | Prints a pair of HTML tags that specify the text they surround as a variable name, or a variable that might be entered by the user. Usually rendered as italics. |
参数 | ctext in varchar2 cattributes in varchar2 DEFAULT NULL |
Generates | <VAR cattributes>ctext</VAR> |
The physical format tags are used to specify the format of the marked text.
Note: All the hypertext procedures (HTP) shown in this section are also available as hypertext functions (HTF).
语法 | htp.bold (ctext, cattributes); |
作用 | Prints a pair of HTML tags that specify the text they surround is to be rendered as boldface. |
参数 | ctext in varchar2 cattributes in varchar2 DEFAULT NULL |
Generates | <B cattributes>ctext</B> |
语法 | htp.italic (ctext, cattributes); |
作用 | Prints a pair of HTML tags that specify the text they surround is to be rendered as italics. |
参数 | ctext in varchar2 cattributes in varchar2 DEFAULT NULL |
Generates | <I cattributes>ctext</I> |
语法 | htp.teletype (ctext, cattributes); |
作用 | Prints a pair of HTML tags that specify the text they surround is to be rendered in a fixed width typewriter font, e.g. Courier. |
参数 | ctext in varchar2 cattributes in varchar2 DEFAULT NULL |
Generates | <TT cattributes>ctext</TT> |
Forms can have the following types of elements:
Note: All the hypertext procedures (HTP) shown in this section are also available as hypertext functions (HTF).
语法 | htp.formOpen (curl, cmethod); |
作用 | Prints an HTML tag that starts the form. The curl value is required and is the URL of the CGI script, normally owa, to which the contents of the Form will be sent. The method is either "GET" or "POST." |
参数 | curl in varchar2 cmethod in varchar2 DEFAULT 'POST' |
Generates | <FORM ACTION="curl" METHOD="cmethod"> |
语法 | htp.formClose; |
作用 | Prints an HTML tag that closes the <FORM> tag |
参数 | none |
Generates | </FORM> |
语法 | htp.formCheckbox (cname, cvalue, cchecked, cattributes); |
作用 | Prints an HTML tag that inserts a checkbox which the user can toggle off or on. |
参数 | cname in varchar2 cvalue in varchar2 DEFAULT 'on' cchecked in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <INPUT TYPE="checkbox" NAME="cname" VALUE="cvalue" CHECKED cattributes> |
语法 | htp.formHidden (cname, cvalue, cattributes); |
作用 | Prints an HTML tag that sends the content of a field along with a submitted form. The field is not visible to the end user. |
参数 | cname in varchar2 cvalue in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <INPUT TYPE="hidden" NAME="cname" VALUE="cvalue" cattributes> |
语法 | htp.formImage (cname, csrc, calign, cattributes); |
作用 | Prints an HTML tag that creates an image field that can be clicked on causing the Form to be immediately submitted. The coordinates of the selected point are measured in pixels, and returned (along with other contents of the form) in two name/value pairs. The x-coordinate is submitted under the name of the field with ".x" appended, and the y-coordinate with the ".y" appended. Any value attribute is ignored. The image itself is specified by the CSRC attribute. |
参数 | cname in varchar2 csrc in varchar2 calign in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL; |
Generates | <INPUT TYPE="image" NAME="cname" SRC="csrc" ALIGN="calign" cattributes> |
语法 | htp.formPassword (cname, csize, cmaxlength, cvalue, cattributes); |
作用 | Prints an HTML tag that creates a single line text entry field. Text will not be displayed as it is entered. When the user enters a password, characters are represented by asterisks on single line text entry field. |
参数 | cname in varchar2 csize in varchar2 cmaxlength in varchar2 DEFAULT NULL cvalue in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <INPUT TYPE="password" NAME="cname" SIZE="csize" MAXLENGTH="cmaxlength" VALUE="cvalue" cattributes> |
语法 | htp.formRadio (cname, cvalue, cchecked, cattributes); |
作用 | Prints an HTML tag that inserts a radio button on the HTML Form. Used to create a set of radio buttons, each representing a different value, only one of which will be toggled on by the user. Each radio button field should have the same name. Only the selected radio button will generate a name/value pair in submitted data area. This will require an explicit VALUE attribute. |
参数 | cname in varchar2 cvalue in varchar2 cchecked in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <INPUT TYPE="radio" NAME="cname" VALUE="cvalue" CHECKED cattributes> |
语法 | htp.formReset (cvalue, cattributes); |
作用 | Prints an HTML tag that creates a RESET button that, when selected, resets all the form fields to their initial values. |
参数 | cvalue in varchar2 DEFAULT 'Reset' cattributes in varchar2 DEFAULT NULL |
Generates | <INPUT TYPE="reset" VALUE="cvalue" cattributes> |
语法 | htp.formSubmit (cname, cvalue, cattributes); |
作用 | Prints an HTML tag that creates a button that, when selected, submits the form. If a SUBMIT button is selected to submit the Form, and that button has a name attribute specified, the submit button then contributes a name/value pair to the submitted data. |
参数 | cname in varchar2 cvalue in varchar2 DEFAULT 'Submit' cattributes in varchar2 DEFAULT NULL |
Generates | <INPUT TYPE="submit" NAME="cname" VALUE="cvalue" cattributes> |
语法 | htp.formText (cname, csize, cmaxlength, cvalue, cattributes); |
作用 | Prints an HTML tag that creates a field for a single line of text. |
参数 | cname in varchar2 csize in varchar2 DEFAULT NULL cmaxlength in varchar2 DEFAULT NULL cvalue in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <INPUT TYPE="text" NAME="cname" SIZE="csize" MAXLENGTH="cmaxlength" VALUE="cvalue" cattributes> |
语法 | htp.formSelectOpen (cname, cprompt, nsize, cattributes); |
作用 | Prints an HTML tag that begins a Select list of alternatives. Contains the attribute NAME which specifies the name that will be submitted as a name/value pair. |
参数 | cname in varchar2 cprompt in varchar2 DEFAULT NULL nsize in integer DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | cprompt <SELECT NAME="cname" SIZE="nsize" cattributes> |
Example | htp.formSelectOpen('greatest_player'; 'Pick the greatest player:'); htp.formSelectOption('Messier'); htp.formSelectOption('Howe'); htp.formSelectOption('Hull');. htp.formSelectOption('Gretzky');. htp.formSelectClose; generates: Pick the greatest player: <SELECT NAME="great player"> <OPTION>Messier <OPTION>Howe <OPTION>Hull <OPTION>Gretzky </SELECT> |
Note: See htp.formSelectOption and htp.formSelectClose.
语法 | htp.formSelectOption (cvalue, cselected, cattributes); |
作用 | Prints an HTML tag that represents one choice in the Select element. |
参数 | cvalue in varchar2 cselected in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <OPTION SELECTED cattributes>cvalue See example for htp.formSelectOpen. |
Example | See htp.formSelectOpen. |
语法 | htp.formSelectClose; |
作用 | Prints an HTML tag that ends a Select list of alternatives. |
参数 | none |
Generates | </SELECT> |
Example | See htp.formSelectOpen. |
语法 | htp.formTextarea (cname, nrows, ncolumns, calign, cattributes); |
作用 | Prints an HTML tag that creates a text field that has no predefined text in the text area. Used to enable the user to enter several lines of text. |
参数 | cname in varchar2 nrows in integer ncolumns in integer calign in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <TEXTAREA NAME="cname" ROWS="nrows" COLS="ncolumns" ALIGN="calign" cattributes></TEXTAREA> |
语法 | htp.formTextareaOpen (cname, nrows, ncolumns, calign, cattributes); |
作用 | Prints an HTML tag that opens a text area where you can insert predefined text that will always appear in the text field. |
参数 | cname in varchar2 nrows in integer ncolumns in integer calign in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <TEXTAREA NAME="cname" ROWS="nrows" COLS="ncolumns" ALIGN="calign" cattributes> |
语法 | htp.formTextareaClose; |
作用 | Prints an HTML tag that ends TextArea field |
参数 | none |
Generates | </TEXTAREA> |
The Table tags allow the user to insert tables and manipulate the size and columns of the table in a document.
Note: All the hypertext procedures (HTP) shown in this section are also available as hypertext functions (HTF).
语法 | htp.tableOpen (cborder, calign, cnowrap, cclear, cattributes); |
作用 | Prints an HTML tag that begins an HTML table. |
参数 | cborder in varchar2 DEFAULT NULL calign in varchar2 DEFAULT NULL cnowrap in varchar2 DEFAULT NULL cclear in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL; |
Generates | <TABLE BORDER NOWRAP ALIGN="calign" CLEAR="cclear" cattributes> |
Note: The BORDER attribute is only determined by whether cborder is null or not null.
语法 | htp.tableClose; |
作用 | Prints an HTML tag that ends an HTML table. |
参数 | none |
Generates | </TABLE> |
语法 | htp.tableCaption (ccaption, calign, cattributes); |
作用 | Prints an HTML tag that places a caption in the inserted table. |
参数 | ccaption in varchar2 DEFAULT NULL calign in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <CAPTION ALIGN="calign" cattributes>ccaption</CAPTION> |
语法 | htp.tableRowOpen (calign, cvalign,cdp, cnowrap, cattributes); |
作用 | Prints an HTML tag that inserts a row tag into a table. |
参数 | calign in varchar2 DEFAULT NULL cvalign in varchar2 DEFAULT NULL cdp in varchar2 DEFAULT NULL cnowrap in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <TR ALIGN="calign" VALIGN="cvalign" DP="cdp" NOWRAP catttributes> |
语法 | htp.tableRowClose; |
作用 | Prints an HTML tag that ends a row in a table. |
参数 | none |
Generates | </TR> |
语法 | htp.tableHeader (cvalue, calign, cdp, cnowrap, crowspan, ccolspan, cattributes); |
作用 | Prints an HTML tag that inserts a table header. |
参数 | cvalue in varchar2 DEFAULT NULL calign in varchar2 DEFAULT NULL cdp in varchar2 DEFAULT NULL cnowrap in varchar2 DEFAULT NULL crowspan in varchar2 DEFAULT NULL ccolspan in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <TH ALIGN="calign" DP="cdp" ROWSPAN="crowspan" COLSPAN="ccolspan" NOWRAP cattributes>cvalue</TH> |
语法 | htp.tableData (cvalue, calign, cdp, cnowrap, cattributes); |
作用 | Prints an HTML tag that inserts data into the rows and columns of a selected table. |
参数 | cvalue in varchar2 DEFAULT NULL calign in varchar2 DEFAULT NULL cdp in varchar2 DEFAULT NULL cnowrap in varchar2 DEFAULT NULL cattributes in varchar2 DEFAULT NULL |
Generates | <TD ALIGN="calign" DP="cdp" ROWSPAN="crowspan" COLSPAN="ccolspan" NOWRAP cattributes>cvalue</TD> |