QuoteciteAttribute

引用对象参考手册Quote Object

Examples

Return the citation source:

var x = document.getElementById("myQuote").cite;

xThe output is:

http://www.wwf.org

Try it Yourself »

Definition and Usage

The cite attribute sets or returns the value of the cite attribute of a quotation.

The cite attribute describes the URL source address of the quotation.

Note:The cite attribute has no visual effect in ordinary web browsers, but can be used by screen readers.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers support the cite attribute.


Syntax

Return the cite attribute:

quoteObject.cite

Set the cite attribute:

quoteObject.cite=URL

Attribute Values

Value Description
URL The URL of the source of the quotation.

Possible values:

  • Absolute URL - points to another website (e.g. cite="http://www.example.com")
  • Relative URL - points to a page within the website (e.g. cite="example.html")

Technical Details

Return Value: A string, the URL address of the source document.


More Examples

Example

Change the cite attribute value of a quotation:

document.getElementById("myQuote").cite="http://www.cnn.com/";

Try it Yourself »

Related Pages

HTML Reference:HTML <q> cite Attribute


引用对象参考手册Quote Object

Other Extensions