Home > PHP Framework > YII > body text

The jq code written in yii does not take effect

王林
Release: 2020-02-18 14:39:07
Original
3017 people have browsed it

The jq code written in yii does not take effect

You can put the JS code into $this->registerJS() in the view, which will ensure that the JS code is below the JS library.

is as follows:

$this->registerJs('alert(1)');
Copy after login

(Recommended tutorial: yii framework)

Of course, your JS code may not be so simple. And ensure the readability of multi-line JS code. You can first put it in the code block of the view, as shown below:

The jq code written in yii does not take effect

For more programming-related content, please pay attention to the Programming Introduction column on the PHP Chinese website !

The above is the detailed content of The jq code written in yii does not take effect. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
yii
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template