javascript - dede website building How to add js in the head when generating html files
给我你的怀抱
给我你的怀抱 2017-05-16 13:07:17
0
3
614
I have never used dedecms. Now I want to develop a website for the second time. I need to determine when a user enters using a mobile phone.
Just use js to jump to the specified mobile website?
I found that dede can automatically generate html. It seems unreasonable to add it to each html by yourself.
Who can explain it? 
给我你的怀抱
给我你的怀抱

reply all(3)
小葫芦

There should be a template, you can add it in the head or foot.

PHPzhong

Just add it to the head of the template, or write a common js file and import it into the template.

PHPzhong

Functions that can be processed directly in the include/dedetag.class.php file without using js. I think you should change the LoadTemplate function and use $_SERVER['HTTP_USER_AGENT'] to determine the browser core. Of course, if you are not good at writing php, it will be awkward.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template