input onclick="window.location.href='https://www'">不能跳转问题。

使用input onclick属性跳转是遇到问题。。不能跳转

上面的onclick里面应该怎么写?我试了几次都不行不知道是不是方法有问题
<input type="button" value="跳转至登录页" onclick="javascript:window.location.href=‘XXX‘"> 这样写没反应,不知道该怎么写?

在网页端可以跳转,在手机端不能跳转。

解决办法

在手机端改成    onclick="location=‘login.php‘"

input onclick="window.location.href='https://www'">不能跳转问题。

时间: 2024-08-02 03:23:46

input onclick="window.location.href='https://www'">不能跳转问题。的相关文章

onclick=&quot;window.location.href=&#39;xxx.jsp/action&#39;&quot; 无法跳转问题

链接类型的按钮  用onclick="window.location.href=" ' xxx.action' " 我做页面的时候因为一个跳转要用到 超链接类型的按钮,可是我点击按钮后发现没有反应,服务器也没有报错,可把单击按钮后要发生的一系列流程全部检查了好几次还是不行 不经意间看到 我设置 input标签的 type="submit"   原来我并不打算在<s:form>中的action进行出去 所以action=" "

5. window.location.href/replace/reload()--页面跳转+替换+刷新

1.window.location=url; window.location 对象用于获得当前页面的地址 (URL),并把浏览器重定向到新的页面. 一.最外层top跳转页面,适合用于iframe框架集 top.window.location.href("${pageContext.request.contextPath}/Login_goBack"); ===================================================================

window.location.href/replace/reload()/页面跳转+替换+刷新

一.最外层top跳转页面,适合用于iframe框架集 top.window.location.href("url"); ============================================================================================ 二.window.location.href和window.location.replace的区别 1.window.location.href="url":改变u

js如何获取window.location.href跳转后查询字符串的值?

$("#worked_count").parent().attr("onClick","window.location.href='view/warn/task_list.html?task_status=D'"); $(document).ready(function () { console.dir(window.location.search); //打印?task_status=E}); 原文地址:https://www.cnblogs.

window.location.href问题,点击,跳转到首页

onClick="window.location.href='./';" 点击,跳转到首页. location.href=url Js中实现跳转 window.location.href跳转新窗口 window.location.href="http://cwhois.cnnic.cn/validatecode/validate.jsp?value="+strName+"&entity=domain&service=/whois&i

JavaScript在IE6下超级链接window.location.href不跳转的bug 及 解决方案

今天遇到个很诡异的问题,就是<a href="javascript:void(0);" onclick="window.location.href=url"></a>在IE6下面没反应,不跳转到onclik事件中的“window.location.href”. 当时我们在网上找了篇文章很快就解决了,但是文章中没有说明具体原因在哪里,只是说在“window.location.href”后面加一个"return false",

window.location.href 失效的解决办法

第一种:在window.location.href 后面加上 window.event.returnValue = false; 如: <a href="#" onclick="window.location.href='http://www.microsoft.com';   window.event.returnValue=false;"> 第二种: 把window.location.href写成 JavaScript:window.location

window location href 刷新

页面刷新类型: 1.window.location.reload 刷新. window.location.reload()与window.location.href=window.location.href都可以刷新页面. 注: window.location.reload()刷新页面时,页面若有数据提交会提示是否提交数据,就是我们经常看到的那个讨厌的提示框.window.location.href=window.location.href则不会. 2.frame框架刷新. 代码如下: <htm

window.location.Reload()和window.location.href 区别

window.location.Reload()应该是刷新.[相当于 按页面刷新按钮] (如果有数据提交的话,会提示是否提交的(是和否选项)) window.location.href=window.location.href; 是定向url提交数据 他们最大区别是 是否有数据提交: 前者提交数据的刷新                                                               后者没有提交的刷新 首先介绍两个方法的语法: reload 方法,该方