动态截取字符串获取当前网页的URL地址

var url = window.location;
                    var urlArr = url.toString().split(‘/‘);
                    var ustr = urlArr[4]
if(typeof(ustr) =="undefined")
{
}
else
{
$("#w-down").attr("style","background:url(../../../images/down.png)  center center;)");
                                        $("#w-btn").attr("style","background:url(../../../images/close.png)  no-repeat;) ");
                                        $("#w-top").attr("style","background:url(../../../images/up.png)  no-repeat;)");

}

时间: 2024-08-28 10:01:18

动态截取字符串获取当前网页的URL地址的相关文章

获取当前页面完整URL地址

<?php /** * 获取当前页面完整URL地址 */ function get_url() { $sys_protocal = isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://'; $php_self = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; $p

C#检查字符串是否是合法的HTTP URL地址的代码

在研发过程,把开发过程较好的一些内容片段记录起来,下面的内容是关于C#检查字符串是否是合法的HTTP URL地址的内容,应该是对各位有较大用处. protected string HTTPChecker(string Value) { { } return Value; 原文地址:https://www.cnblogs.com/tudou990/p/10294024.html

iOS-获取当前网页的 url 和 title 和 html

本文转载至 http://www.th7.cn/Program/IOS/201310/156916.shtml @property (strong,nonatomic)UIWebView *webView; @property (strong,nonatomic)NSString *currentURL; @property (strong,nonatomic)NSString *currentTitle; @property (strong,nonatomic)NSString *curren

获取当前网页的 url 和 title 和 html

.h文件 @property (strong,nonatomic)UIWebView *webView; @property (strong,nonatomic)NSString *currentURL; @property (strong,nonatomic)NSString *currentTitle; @property (strong,nonatomic)NSString *currentHTML; .m文件 -(void) webViewDidFinishLoad:(UIWebView

PHP获取当前页面完整url地址,包括参数的函数

//php获取当前访问的完整url地址 function get_current_url(){     $current_url='http://';     if(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=='on'){         $current_url='https://';     }     if($_SERVER['SERVER_PORT']!='80'){         $current_url.=$_SERVER['SE

怎样获取当前网页的URL

1. document.documentURI document.documentURI; // "https://i.cnblogs.com/EditPosts.aspx?opt=1" 2. document.URL document.URL; // "https://i.cnblogs.com/EditPosts.aspx?opt=1" 注意: 1. 两个属性的作用是完全一样的. 都是返回一个当前网页URL的字符串; 2. document.documentUR

运用El表达式截取字符串/获取list的长度

${fn:substring(wjcd.lrsj, 0, 16)} 使用functions函数来获取list的长度 ${fn:length(list)} 引入 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

获取当前窗口的url地址

原文地址:https://www.cnblogs.com/wsj1/p/12219039.html

.net 获取当前网页的的url

正确的方法是:HttpContext.Current.Request.Url.PathAndQuery1.通过ASP.NET获取 如果测试的url地址是http://www.test.com/testweb/default.aspx, 结果如下: Request.ApplicationPath: /testweb Request.CurrentExecutionFilePath: /testweb/default.aspx Request.FilePath: /testweb/default.a