首页 WordPress函数大全 esc_js()

esc_js()

2020-05-01 / 4969阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

esc_js( string $text )

Escape single quotes, htmlspecialchar ” &, and fix line endings.

描述

Escapes text strings for echoing in JS. It is intended to be used for inline JS (in a tag attribute, for example>‘js_escape’ filter is also applied here.

参数

$text

(string)
(Required)
The text to be escaped.

返回

(string) Escaped text.

大家谈论
    我的见解