| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 556 人关注过本帖
标题:我的JS怎么加上form表单之后就没有用了呢
只看楼主 加入收藏
gabrk1985
Rank: 1
等 级:新手上路
帖 子:27
专家分:7
注 册:2009-8-25
结帖率:50%
收藏
已结贴  问题点数:10 回复次数:1 
我的JS怎么加上form表单之后就没有用了呢
<html>
<head>
<script type="text/javascript">
window.onload=function disp_alert()
{
var a=document.getElementById('channeltype1');
    if(a.checked){
location.href='  http://www.';
    }
}
</script>
</head>
<body>
<form>
 
    <input name="channeltype" id="channeltype1" type=radio >公司
        </div>
        <div class="form">
         
           <button type="submit" class="search-show" onClick="disp_alert()">搜索</button>
   
     
        </form>
</body>
</html>
搜索更多相关主题的帖子: function 
2011-04-25 12:28
li_kuan
Rank: 2
等 级:论坛游民
帖 子:2
专家分:10
注 册:2011-4-26
收藏
得分:10 

<html>
<head>
<script type="text/javascript">
function disp_alert(){
    location.href='http://www.';
}
</script>
</head>
<body>
<form>
  <div class="form">   
    <input name="channeltype" id="channeltype1" type=radio >公司
    <button onClick="disp_alert()">搜索</button>
  </div>
</form>
</body>
</html>
2011-04-26 14:06
快速回复:我的JS怎么加上form表单之后就没有用了呢
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013629 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved