Path issues for Web projects

Source: Internet
Author: User

First, use the base tag so that the relative and absolute paths can be used simultaneously

However, the base tag is incompatible with IE's low version (IE8 and IE8 below)

However, given that IE has an unparalleled dominance in the country, it has been changed to a different wording:

<script type= "Text/javascript" >
Solve the problem that IE does not support the base very well
var base = document.getElementsByTagName ("base") [0].getattribute ("href");
window.location = Base+ "user/search?pagenum=" +pagenum+ "&everypagecount=" +everypagecount+ "& Username= "+username;

......

Second, the absolute path is fully used in the project, do not use the base tag

CSS file: The resource path in the CSS file is the physical relative path to the current file , and you can do so without using an absolute path

JS file: Need absolute path, add an absolute path to JS variable in Common.js

Path issues for Web projects

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.