window.location
javascript how to switch pathname of window.location property and redirect
I want to redirect a user from varying urls to a specific one.I\'ve tried various flavors of replacing and I cant seem to get the behavior I want.This code works except I\'m providing the hostname.I w[详细]
2023-04-13 07:59 分类:问答redirecting to URL while changing parent path in JavaScript
I have an url: http://domain/request.php?id=123 Now on this site I have a button with a submit handler that is supposed to redirect to[详细]
2023-04-12 20:27 分类:问答Location globally defined in Chrome 13
I was using the Developer Tools in Chrome 13 when I typed this line: var location = \"Hello\"; Upon pressing enter, the page changed and gave me a 404 error. The address bar now had Hello appended[详细]
2023-04-05 15:55 分类:问答js file - insert window.location into appended html
I have a js file that is appending html. For one specific relative link, I need the link to be https. I\'m assuming I would set a var, but I\'m unsure how to insert it into the appended html within th[详细]
2023-04-04 00:57 分类:问答Using window.location.replace is there any way to change port as well?
Using the various methods/assignments to change the browser url using js.All work fine but whilst I can read the current port, I can\'t seem to se开发者_StackOverflowt the new port - is this possible[详细]
2023-03-28 21:58 分类:问答location.href does not work in chrome when called through the body/window unload event
Javascript - document.location or window.location or window.location.开发者_如何学编程href or location.href does not work in Google Chrome 6 and 7(i didnt test lowers versions) when called from the wi[详细]
2023-03-25 08:11 分类:问答javascript window.location not working in firefox
this one is really giving me a headache: using javascript (let\'s say on page1.html) i use code similar to below to launch a new window:[详细]
2023-03-23 03:38 分类:问答Timer based redirect problem using window.location
<script language=\"JavaScript\" type=\"text/javascript\"> var theBar = createProgressBar(document.getElementById(\'progress-bar\'));[详细]
2023-03-20 15:10 分类:问答location.hash issue in js
I have a piece of javascript that I inherited; it\'s being used as a tab switcher. Unfortunately it\'s not working. Here\'s the code:[详细]
2023-03-19 04:45 分类:问答Targeting window.location.pathname
I have a url similiar to this: www.mysite.com/products/ I was using this to test against the pathname: if (/\\/products\\//.test(window.location)) {[详细]
2023-03-13 15:55 分类:问答