Home > Backend Development > PHP Tutorial > onclick跳转有关问题

onclick跳转有关问题

WBOY
Release: 2016-06-13 12:25:29
Original
1020 people have browsed it

onclick跳转问题


  怎么能onclick之后获取 "t" 的值  在跳到query
------解决思路----------------------
document.getElementById("t").value  得到t  值,然后赋值给query
------解决思路----------------------

<br />function load(){<br />    var id=document.getElementById("t").value;<br />    window.location.href = url=‘city.php?module=query&t='+t;<br />}<br />
Copy after login

------解决思路----------------------
{literal}

{/literal}

{literal}<br /><script language="javascript"><br />function load(){<br />var id=document.getElementById("t").value;<br />alert(url='city.php?module=query&t='+id);<br />location.href=url;<br />}<br /></script><br />{/literal}
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template