You are here: Reference > JavaScript > client-side > style handling > properties > browser specific extensions > XvInterpretAs
XvInterpretAs style property
Specifies or retrieves how to interpret the contents of the corresponding element.
Same as the interpret-as property in the CSS3 declaration.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: -xv-interpret-as |
Possible values:
The type of this property is string.
One of the following values:
Element's content is an address. | |||||||
Element's content is a currency value. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
Element's content is a measurement. | |||||||
Element's content is a proper name of a person, company etc. | |||||||
Element's content is a URI such as an email address or an http URI. | |||||||
Element's content is a telephone number. |
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the -xv-interpret-as property:
|
||||
<head> <style> .name { -xv-interpret-as: name; } .telephone { -xv-interpret-as: telephone; } .net { -xv-interpret-as: net; } </style> </head> <body> <p class="name">Oscar de la Hoya</p> <p class="telephone">(212) 907-8686</p> <p class="net">www.goldenboysite.us</p> </body> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the XvInterpretAs property in JavaScript:
|
||||
<head> <style> #example { -xv-interpret-as: address; } </style> <script type="text/javascript"> function ChangeIntpr (selectTag) { var example = document.getElementById ("example"); // Returns the index of the selected option var whichSelected = selectTag.selectedIndex; // Returns the text of the selected option var selectState = selectTag.options[whichSelected].text; if ('XvInterpretAs' in example.style) { example.style.XvInterpretAs = selectState; } else { alert ("Your browser doesn't support this example!"); } } </script> </head> <body> <p id="example">615 Dottoro Ave, Webville, AR</p> Select the text above, right click and select speak, or change interpret mode: <select onchange="ChangeIntpr (this);" size="6"> <option selected="selected">address</option> <option>currency</option> <option>measure</option> <option>name</option> <option>net</option> <option>telephone</option> </select> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
CSSStyleDeclaration, htmlElement.currentStyle, htmlElement.style
HTML elements:
a, abbr, acronym, address, b, bdo, big, blink, blockquote, body, button, caption, center, cite, code, col, colgroup, dd, del, dfn, dir, div, dl, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, html, i, input:button, input:file, input:password, input:reset, input:submit, input:text, ins, isindex, kbd, label, legend, li, marquee, menu, ol, optgroup, option, p, plaintext, pre, q, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var, xmp
Related pages:
opPhonemes
XvVoiceBalance
XvVoiceDuration
opVoicePitch
opVoicePitchRange
opVoiceRate
opVoiceStress
opVoiceVolume
cue
cueAfter
cueBefore
pause
pauseAfter
pauseBefore
rest
restAfter
restBefore
speak
voiceFamily
XvVoiceBalance
XvVoiceDuration
opVoicePitch
opVoicePitchRange
opVoiceRate
opVoiceStress
opVoiceVolume
cue
cueAfter
cueBefore
pause
pauseAfter
pauseBefore
rest
restAfter
restBefore
speak
voiceFamily
External links:
User Contributed Comments