Home >Web Front-end >JS Tutorial >JavaScript obtains path design source code_javascript skills

JavaScript obtains path design source code_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:47:111227browse

1. Design source code

Copy the code The code is as follows:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>





JavaScript Get Path
















2. Design results

(1) During initialization

(2) Get the current URL

(3) Obtain the directory after the host address

(4) Returns the position where a specified string value first appears in the string

(5) Get the host address

(6) Get the project name with "/"

(7) Get project path

Statement:
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