关于获取location地址栏的数据(?后边)

DCDC开关节点SW的Layout抉择:打孔换层与EMI共模辐射的权衡 本文深入探讨了DCDC转换器中开关节点SW的Layout设计对EMI共模辐射的影响。通过分析SW节点的EMI辐射机制、打孔换层对输入环路的影响以及铜皮面积与共模辐射的量化关系,提出了工程实践中的权衡策略和优化方法,帮助工程师在设计中平衡EMI性能和电路效率。 阅读详情

今天在学习中遇到需要通过地址栏传参数并接收使用,一时间忘记了怎么获取,这里做个笔记加深一下印象
获取地址栏的信息需使用location对象,获取?及其之后的数据使用的是 location.search
举个例子,获取的结果为

//https:*****.com/?key=1&&wd=s 获取结果为
// "?key=1&&wd=s"

获取的结果为String类型,这时我们就可以通过String对象的split方法将其分隔成数组存入对象,就可以方便调用了,封装一下

var getUrl = function () {
    var str = decodeURI(location.search);
    var obj = {};
    if (str) {
        str = str.replace("?",'');
        var arr = str.split("&");
        arr.forEach(function (item,index) {
            var newArr = item.split("=");
            obj[newArr[0]] = newArr[1];
        })
    }
    return obj;
}
Eplan2022 复制已有的宏文件生成新的原理图宏文件 Eplan2022 新建原理图宏文件 阅读详情

相关推荐

【chips】个人笔记系列-SystemVerilog

个人整理的Systemverilog笔记。

Hide_in_Code 2057

JS获取QueryString(Jquery)

$(document).ready(function () { $("#sonpage_title").html(decodeURI(getQueryStringByName('title'))); }); function getQueryString() { var result = location.search.match(new Re...

weixin_33881753的博客 282

BioEmu:微软黑科技炸场!生成式AI重构蛋白质模拟:千倍效率碾压传统计算,新药研发周期砍半

BioEmu 是微软推出的生成式深度学习系统,可在单个 GPU 上每小时生成数千种蛋白质结构样本,支持模拟动态变化、预测热力学性质,并显著降低计算成本。

士多啤梨先生の博客 1097

js中input框中的值的获取方法;

替换为您输入框的实际ID,或使用其他选择器(如类名、标签名)来获取输入框元素。input框的值的获取方法有三种。请读者根据需求自行选择。

tianxianghuiwei的博客 7220

基因家族Motif 分析

MEME

hgz2020的博客 6317

银行一表通监管报送系统详解

国家金融监管总局对于“一表通”的总体描述为:通过建立一套明细级、标准化的数据体系和汇总计算规则,将银行机构传送至监管可信区的业务明细数据汇总生成财务指标、监管指标和监管报表,大幅提升监管数据时效性,统一数据标准,实现数据间的穿透和整合,同时改变机构多头报送数据模式,减轻机构报送负担。

银行信息系统应用架构详解 2516

如何获取地址栏中的参数

第一种:字符串拆分法 window.location.href 或者 location.href 或者 window.location 获得地址栏中的所有内容 decodeURI() 可以解码地址栏中的数据 恢复中文数据 window.location.search 获得地址栏中问号及问号之后的数据 //获取地址栏里(URL)传递的参数 function GetRequest(value) { //url例子:www.bicycle.com?id="123456"&Name="bicy

weixin_47648850的博客 913

在MATLAB和Simulink中设计并仿真一个智能建筑能效优化系统

智能建筑能效优化是现代建筑管理的重要组成部分,旨在通过智能化手段降低能源消耗、减少碳排放并提高居住舒适性。通过Simulink进行智能建筑能效优化仿真,可以验证控制策略的有效性、优化系统设计并降低开发成本。以下是如何在MATLAB和Simulink中设计并仿真一个智能建筑能效优化系统的详细步骤。通过上述步骤,我们成功设计并实现了基于Simulink的智能建筑能效优化仿真。该系统能够模拟复杂的建筑环境,验证能效优化策略的有效性,并通过优化设计提高建筑的能源利用效率和居住舒适性。

xiaoheshang_123的博客 138

获取location.href的参数 | 页面跳转传递参数

页面跳转传递参数,location.href

随便写写 3265

RK3568平台(电源篇)电源域IO配置

在kernel之前需要修改电源域,主控电源域的IO电平要与对接外设芯片的IO电平匹配,还要注意软件的电压配置要跟硬件的电压一致,否则,最坏的情况可能会导致IO的损坏。其实就是管理 IO 输出的电平;假如硬件上 IO 电源域配置为 3.3V,则 IO 输出最大电平为 3.3V;同理 IO 电源域硬件配置为 1.8V,则 IO 输出最大电平是 1.8V;这样有利于 IO 电平的灵活配置;

weixin_49303682的博客 3478

【项目解析】2KW 230V 数字逆变器控制系统(二)

【项目解析】 2KW 230V 数字逆变器控制系统(一) 项目的 交流输出电压 并不是单纯一个电压环就能控制好的,而是典型的 双环控制架构:最终占空比控制量会经过计算: 然后写入 单片机 TMM 定时器的比较寄存器 (TMGRA0/TMGRD0/TMGRC1), → 定时器输出互补 PWM, → 驱动 IGBT 全桥, → 经过 LC 滤波形成 230 VAC / 50Hz 的正弦电压。总结交流电压是双环控制的结果:目标/作用:把输出 RMS 电压稳到目标(例如 230 VAC);在母线波动与负载变化下

Naiva的博客 1296

JS 截取地址?后的值变成对象

【代码】JS 截取地址?后的值变成对象。

UserGuan的博客 497

在 LangGraph 中集成 Skills 增强智能体能力

LangGraph 的核心是通过**状态机 + 节点(Node) + 工具(Tool)**来编排智能体流程,你可以把 Skills 理解为“封装好的工具或可复用的任务流”,下面是一套可落地的集成方案。

lpfasd123的博客 1178

JS获取浏览器地址栏中的参数值

获取地址栏地址内容: 使用:window.location.href 获取地址栏中的所有参数: 使用:window.location.search JS方法: getParamValue("id"); //http://localhost:8080/test.jsp?id=1 //返回值是1; // 根据参数名称获取参数值 function getPar...

图图小淘气的博客 1005

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

js 获取地址栏参数的两种方法以及window的一些常见用法

js 获取地址栏参数的两种方法 1. 传统方法获取: function getParas(){ var href = location.href.split("?")[1]; var paras = href.includes("&amp;") ? href.split("&amp;") : href; //判断是一组还是多组key:value var arr = []; for(var...

weixin_39228870的博客 690

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

如何获取地址栏的id (参数)

获取地址栏的id 需求:获取到地址栏传递过来的id值 代码: 方法一:(需要兼容性好) //创建URLSeachParams对象,使用对象来获取地址栏的参数 var temp = new URLSearchParams(location.search); var id = temp.get('id'); // console.log(id); 方法二:(函数封装) //从...

qq_40282446的博客 3832

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

获取和添加URL地址栏参数

URL地址(添加参数:传参) js写法: //1.window.location.href var a ="1018802,8" var b ="1" window.location.href="../EditPosts.aspx?postid="+a+"&update="+b; //2.字符串模板,动态生成href属性 var c = '<a class=" " hre...

weixin_30498807的博客 362

js获取地址栏url以及获取url参数

js原生态写法  代码如下 复制代码 function getUrlParam(name) {     var reg = new RegExp("(^|&amp;)"+ name +"=([^&amp;]*)(&amp;|$)"); //构造一个含有目标参数的正则表达式对象     var r = window.location.search.substr(1).m...

weixin_34090562的博客 1842

两个页面之间通过url地址栏进行传值

第一个页面中有两个图片,当点击的时候能在第二个页面中获得它的属性值,通过location.assign在第一个页面进行传值,location.href在第二个页面进行接受值,一开始不会传值问题,但对于不知道怎么传值的人来说刚开始摸索,觉得好困难,但当会用了之后觉得不难,所以写此文以供参考。 简单示例: 第一个页面:  无标题文档 func

TTO_OTT的专栏 7358

location 获取参数和锚_BOM - Location对象

什么是Location对象? Location是BOM对象之一它可以看做是我们浏览器的地址栏输入框,提供了当前窗口中加载文档的有关信息,还提供了一些导航功能。先来看一下属性:url:统一资源定位符我们依次来看一下:location.hash; 锚点当我们输出它时alert( location.hash );直接返回结果是没有锚点的假设我们在地址栏中加上一个#1,再来刷新,就可以看到锚点出现了所谓...

weixin_35606769的博客 358

获取地址栏参数

获取地址栏参数

wbbott的博客 625

获取网页地址栏

var v = window.location.search;获取地址栏                 var a = v.substring(v.lastIndexOf("=") + 1);截取地址栏获取参数

niuyongaiai的博客 379

JQ 获取地址栏参数

var cat_id = getParamValue("cat_id"); if(cat_id == null){ cat_id = 1; } $("#brand_cat_ul a").removeClass("a_check"); $("#brand_cat_ul .a_"+cat_id).addClass("a_c...

dianchamian8747的博客 263

在html中接收地址栏中的参数

  今天在工作中遇到一个问题,就是要在在html文件中接收地址栏中的参数,以往都是在aspx中接收参数,只要用request[参数名]就行,后来在网友的帮忙下得到解决。虽然不是自己解决,但从中也学到些东西。 window.open ("11.htm?aa="+dd);问题就是从11.htm中接收aa的值 解决方案如下: 1.使用 window.location.search 来取得后面的参数 //

519

前端基础(十八):地址栏地址分析&获取地址栏传参

Example 地址:http://127.0.0.1:8082/prosperleedir/index.html?id=6666&name=prosper#prosper Location{ assign:ƒ (), // 加载新的文档。 hash:"#prosper",

You瞧谁不起 - 道不尽世间的沧桑,诉不完人生的悲凉 982

JS BOM操作地址栏、浏览器信息

获取浏览器地址栏信息 window.location console.log(window.location); 浏览器的地址信息: 在 window 中有一个对象叫做 location 就是专门用来存储浏览器的地址栏内的信息的 href属性 控制浏览器地址栏的内容 reload()方法 刷新页面 注意: 不要写在全局,不然浏览器就会一直处在刷新状态 1. window.location.r...

珎珎啊 811
上一篇: less中的循环
下一篇: 关于MUI的对话框
seiEight
博客等级 码龄7年 15粉丝 26原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值