我希望将一个var附加到一个url,其功能是我有一个click事件.
说网址是www.example.com
在运行该功能后,它就变成了.
www.example.com?folder=beats
我有功能抓取正确的文件夹值,但需要将其附加到当前页面网址.
function fileDialogStart() {
$folder = $('#ams3Folder').val();
}
Run Code Online (Sandbox Code Playgroud)
任何帮助
function fileDialogStart()
{
var newURLString = window.location.href +
"?folder=" + $('#ams3Folder').val();
window.location.href = newURLString; // The page will redirect instantly
// after this assignment
}
Run Code Online (Sandbox Code Playgroud)
有关更多信息,请转到此处.
归档时间: |
|
查看次数: |
13127 次 |
最近记录: |