Add object parameters to the URL and overwrite JS code If there is one in the original URL
function Addtourl (obj) {var aprotocol = Location.protocol;
var ahost = Location.host;
var apath = Location.pathname;
var asearch = Location.search;
var ahash = Location.hash;
var result = ';
Console.log (obj);
var joinobj = function (joinobj_obj) {var result = ';
for (var i in joinobj_obj) {result = i
This is about getting the URL address (VC + +) that is opened when IE, and automatically printing out the corresponding URL source code content:
Put this in your header file stdafx.h #import
Description: Simply traverse all the nodes of the entire Web page, find the first page in the container (the first page of multiple IE pages), and then traverse to remove all child nodes and print. We can test it,
Copy Code code as follows:
Module HTTP URL that needs to be used
Current URL http://localhost:8888/select?aa=001bb=002
var http = require (' http ');
var URL = require (' URL ');
Http.createserver (function (req, res) {
var arg = Url.parse (req.url). query; Method one arg => aa=001bb=002
var arg =
The following code outputs a URL that is
Http://localhost:8080/news/HelloServlet?hello=%e5%a4%a7%e5%ae%b6%e5%a5%bdtest=%e5%a4%a7%e5%ae%b6%e5%a5%bd
HTML code
Value= "Http://localhost:8080/news/HelloServlet" var= "url"
>
Name= "Hello" value= "${hello}"
/>
Name= "Test" value= "${hello}"
/>
href= "/>"
>${hello}
,url提交汉字乱码">,
First, extract the parameters from the URL
There are the following strings:
var linkurl = ' http://localhost:8080/String/string_6.html nickname = small Xishan son age=24#id1 ';
For a real URL address, you can use JS to read the relevant information in location to obtain some information, listed below:
Copy Code code as follows:
Location.origin:http://localhost "Domain"
Location.pathname:
Whether front-end development or background design, many times developers need to get information about the current or target URLs. This existing built-in object attribute can be invoked directly (here is the reference code to get the current page)
Copy Code code as follows:
But sometimes we need to change the current URL of the parameters/parameter values, at this time what people will handle it? In general, you should make a
Original: IIS8 How to install and use the URL rewriting tool-url RewriteDownload and install the URL RewriteIIS8 The URL rewriting tool is not installed by default, you must download the installation yourself.If you have installed the Web Platform Installer by default on IIS, we can use the platform to automatically in
Javascript performs url check. It is usually determined by using a regular expression. The format is correct, for example:Copy codeThe Code is as follows:/^ Https? : \/\ //. Test (url );Of course, there are also better detection methods such as the valid-url library for Verification Based on RFC 3986, RFC 3966, RFC 4694, RFC 4759, and other standards.However, the
Microblog short Address principle parsing (Java implementation)
one way to do this is to invoke a third-party interface that provides a short-address service to generate. Generally they provide interfaces or call packages.
Such as:
How to call Baidu short URL api? Http://www.baidu.com/search/dwz.html (can be called without authorization)
Sina short URL API interface (updated March 15)
Sina updated long
We sometimes see an address like this: "Why? Type = 12 id = 34 ", why? There are multiple reasons: First, enhanced urlfriendliness. Remember show-12-34.html "total ratio"/aspx/show. aspx? Type = 12 id = 34 "is it easy to remember? The second is to facilitate search engine indexing. Many search engines prefer static html pages, such as Baidu. The second is for security reasons because the parameters "type" and "ID" are hidden ". Is it interesting?
In fact, this is implemented using
Recently, the project encountered a question about whether to filter text input boxes to contain URLs. A widely used online version was used previously: ([A-Za-Z] +: // [^ \ s] *). Later I found that this regular expression can only filter URLs with HTTP protocol, but it cannot filter URLs such as www.sina.com. Use (HTTP (s )://)? ([\ W-] + \.) + [\ W-] + (/[\ W -./? % =] *)?, It is found that the www url without the protocol name can be filtered, bu
Here are the main funding URL display style 1. Open the Config folder below mian.php 2. Modify content like address Http://www.test.com/index.php?r=site/page/sid /1 modified for HTTP://WWW.TEST.COM/SITE/PAGE/SID/1 [PHP] ' Urlmanager ' =>array ( ' Showscriptname ' =>false, //This step is to hide the index.php link in the code. ' urlformat ' => ' path ', ' Rules ' =>array ( '
The two functions used in the project today are self-written and Standby. you can also directly use them as needed. we recommend that you use the first function for obtaining, followed by related processing parameters. First, PHP retrieves the URL of the current page:
The code is as follows:
// Obtain the current script URL
Function GetCurUrl ()
{
If (! Empty ($ _ SERVER ["REQUEST_URI"])
{
$ ScriptName =
The two functions used in the project today are self-written and standby. You can also directly use them as needed. We recommend that you use the first function for obtaining, followed by related processing parameters.
The two functions used in the project today are self-written and standby. You can also directly use them as needed. We recommend that you use the first function for obtaining, followed by related processing parameters.
First, PHP retrieves the
Objective
Short web site services, may be a lot of friends are no longer unfamiliar, and now most of the microblogging, mobile mail reminders and other places have a lot of application mode, and occupy a certain market. It is estimated that many friends are using it now.
Benefits of Short Links:
1, the content needs;2, user friendly;3, easy to manage.
The following is a PHP implementation of a short URL conversion algorithm, the code is as follows
python-the contents of the HTML file to retrieve a specific URL address string, save it as a list, and use each URL to download the picture and save it to the hard drive, the regular re
Reference: http://blog.csdn.net/xwbk12/article/details/72734930
1, the target address: https://xianzhi.aliyun.com/forum/topic/1805/The contents of the following figure
Remove the contents of the target back package like this
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.