Home > Web Front-end > JS Tutorial > body text

JavaScript obtains path design source code_javascript skills

WBOY
Release: 2016-05-16 16:47:11
Original
1192 people have browsed it

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

Related labels:
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