刷新各ifream当前页,下拉项改变触发事件js,给选中项加背景色js
<script type="text/javascript" language="javascript">
//刷新框架各页面
function refresh() {
window.frames["topPage"].window.location.href = window.frames["topPage"].window.location.href;
window.frames["leftPage"].window.location.href = window.frames["leftPage"].window.location.href;
window.frames["mainTopPage"].window.location.href = window.frames["mainTopPage"].window.location.href;
window.frames["mainBottomPage"].window.location.href = window.frames["mainBottomPage"].window.location.href;
window.frames["rightPage"].window.location.href = window.frames["rightPage"].window.location.href;
return false;
}
</script>
让框架页面跳转:
<script type="text/javascript" language="javascript">
//页面跳转
function redirect() {
window.parent.window['mainTopPage'].location = '../ByWhole/dqzh.aspx';
window.parent.window['mainBottomPage'].location = '../ByWhole/dqzhfx.aspx';
return false;
}
</script>
给选中项加背景色js:
//给选中地区加背景
$('.main_cont_city li').each(function() {
$(this).click(function() {
$('.main_cont_city li').removeClass('selected');
$(this).addClass('selected');
});
}); <div class="main_cont_city">
<asp:Repeater ID="rptDq" runat="server">
<HeaderTemplate>
<span class="fl">地区:</span>
<li class="selected"><a href='' onclick=" return redirect();">全国</a></li>
</HeaderTemplate>
<ItemTemplate>
<li><a href="javascript:" onclick='dqRedirect(<%#Eval("dq_id") %>)'>
<%#Eval("dq_name") %></a></li>
</ItemTemplate>
</asp:Repeater>
</div>
下拉项改变触发事件js:
var mon = "";
$("#ddlMonth").change(function() {
mon = $(this).val();
window.frames["UpSession"].window.location.href = "../UpSession.aspx?mon=" + mon;
refresh();
});
<asp:DropDownList ID="ddlMonth" runat="server" Width="70px">
<asp:ListItem Value="1" Text="1月份">1月份</asp:ListItem>
<asp:ListItem Value="2" Text="2年">2月份</asp:ListItem>
<asp:ListItem Value="3" Text="3年">3月份</asp:ListItem>
<asp:ListItem Value="4" Text="4年">4月份</asp:ListItem>
<asp:ListItem Value="5" Text="5年">5月份</asp:ListItem>
<asp:ListItem Value="6" Text="6年">6月份</asp:ListItem>
<asp:ListItem Value="7" Text="7年">7月份</asp:ListItem>
<asp:ListItem Value="8" Text="8年">8月份</asp:ListItem>
<asp:ListItem Value="9" Text="9年">9月份</asp:ListItem>
</asp:DropDownList>
刷新各ifream当前页,下拉项改变触发事件js,给选中项加背景色js的更多相关文章
- jquery操作select下拉框的各种方法,获取选中项的值或文本,根据指定的值或文本选中select的option项等
简介jquery里对select进行各种操作的方法,如联动.取值.根据值或文本来选中指定的select下拉框指定的option选项,读取select选中项的值和文本等. 这一章,站长总结一下jquer ...
- select下拉框选择触发事件
我一直以来都认为,select 下拉框选择对选项 options 使用 onclick 注册事件即可,如下: <select> <option value="0" ...
- 点击select下拉框,触发事件
<div class="controls moneycheck floatleft"> <select class="span12 chosen_cat ...
- 关于select下拉框选择触发事件
最开始使用onclick设置下拉框触发事件发现会有一些问题: <select> <option value="0" onclick="func0()&q ...
- select change下拉框改变事件 设置选定项,禁用select
select change下拉框改变事件 设置选定项,禁用select 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitio ...
- PHP文本框的值随下拉框改变
初学PHP,下面是实现文本框内容随下拉框变化的代码实现: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN&q ...
- 下拉框改变事件:获取下拉框中当前选择的文本 SelectionChanged事件
/// <summary> /// 下拉框改变事件:获取下拉框中当前选择的文本 /// </summary> /// <param name="sender&q ...
- Vue 下拉框值变动事件传多个参数
在使用 Vue 进行开发时,下拉框值变动事件 @change 是很常用的. 其传参一般分为两种方式:默认传参和自定义传参. 默认传参 @change 默认会传选中项标识的参数,在传参处不用定义,在方法 ...
- layui select 下拉框 级联 动态赋值 与获取选中值
//下拉框必须在 class="layui-form" 里 不然监听事件没有作用 <div class="layui-form" > <div ...
随机推荐
- 访问本地json文件因跨域导致的问题
我使用jquery的getJSON的方法获取本地的json文件,并进行操作,获取json 数据代码如下: $.getJSON("invite_panel.json",functio ...
- crontab中执行任务定位到秒级
每秒执行一次: * * * * * /bin/sleep 1 ; echo "1"
- 01 - 初探JavaScript魅力
网页特效原理 用JavaScript修改样式 编写JS的流程 布局:HTML+CSS 属性:确定要修改哪些属性 事件:确定用户做哪些操作(产品设计) 编写JS:在事件中,用JS来修改页面元素的样式 鼠 ...
- HDU1242 BFS+优先队列
Rescue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Subm ...
- 第一章-第二题Unity3D游戏引擎相关--By林培文
1) 此类软件是什么时候开始出现的, 这些软件是怎么说服你(陌生人)成为他们的用户的? 他们的目标都是盈利么? 他们的目标都是赚取用户的现金么?还是别的? 2004年,Unity3D诞生于丹麦哥本 ...
- 【emWin】例程七:绘制基本图形
简介:emWin 包含完整的2-D 图形库,可供大多数应用程序充分使用 本例程介绍如何使用图形API绘制基本的2-D图形 实验指导书及代码包下载: 链接:http://pan.baidu.com/s/ ...
- ThinkPHP 3.2.3 使用 Swift Mailer 邮件系统发送邮件
SwiftMailer 下载地址:https://github.com/swiftmailer/swiftmailer 版本:swiftmailer-5.x 把压缩包解压到 /ThinkPHP/Lib ...
- 自定义RecyclerView.ItemDecoration,实现RecyclerView的分割线效果
[转] 原文 自定义RecyclerView.ItemDecoration,实现RecyclerView的分割线效果 字数1598 阅读302 评论2 喜欢23 1.背景 RecyclerView ...
- 60个有用CSS代码片段
1.垂直对齐 如果你用CSS,则你会有困惑:我该怎么垂直对齐容器中的元素?现在,利用CSS3的Transform,可以很优雅的解决这个困惑: .verticalcenter{ position: re ...
- RelativeLayout中的格局,自适应宽度布局
RelativeLayout中的布局,自适应宽度布局 该图片中为android布局:总布局为 RelativeLayoutAtLeft 为居左 <TextView android:backgro ...