Spec-Zone.ru › ColdFusion

jsStringFormat

Escapes special JavaScript characters, such as single quotation mark, double quotation mark, and newline

jsStringFormat(String) → returns string

  • CF4.5+
  • Lucee
  • BL 1.0.0+
  • See Also: encodeForJavaScript

    Argument Reference

    String string
    Required

    Links more information about jsStringFormat

    • Learning jsStringFormat by Ben Nadel - Tutorial showing how to use jsStringFormat

    Examples
    Sample code invoking the jsStringFormat function

    jsStringFormat Example

    This example illustrates use of the JSStringFormat function.

     string = "An example string value with ""quoted"" 'text'";
     writeOutput(JSStringFormat(string)) ;

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/jsstringformat

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API