The method for importing CSS and JS files in the ThinkPHP template. _ PHP Tutorial

Source: Internet
Author: User
The ThinkPHP template imports CSS and JS files ,. The ThinkPHP template imports CSS and JS files. This document describes how to import CSS and JS files in the ThinkPHP template. Share it with you for your reference. The following describes how to import CSS and JS files to the ThinkPHP template,

This document describes how to import CSS and JS files in the ThinkPHP template. Share it with you for your reference. The specific method is as follows:

Common methods

1. css uses link

2. js uses src

Use the import tag of tp

Import the test. Js file in the js directory under the Public folder. the import label can omit the type attribute. the default value is the js file.

The code is as follows:

Not Public:

The code is as follows:

Other is not followed by/in the path/

Use the load label

Load label, very simple, automatic detection

The code is as follows:

I hope this article will help you with ThinkPHP framework programming.

Examples: This article describes how to import CSS and JS files in the ThinkPHP template. Share it with you for your reference. The specific method is as follows...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.