随笔分类 - JQuery
摘要:<td ><input id="rate2" name="n_rate" value="1" align="center" type="radio" onclick="rate_choice()" /><td>$("input[name=n_rate]:eq(1)").attr("checked",'checked'); //表示id为rate2这一项为选择 eq(1) 为对应rate
阅读全文
摘要:<script> var wkl_clone1;$(document).ready(function(){ wkl_clone1 = $("#frame_rate1").clone(); //复制option下的元素}) function remove_rate1(minvalue,maxvalue,firstvalue) //去掉多余option元素{ for(i=minvalue ; i<=maxvalue; i++) { $('#frame_rate1 option:eq(...
阅读全文
摘要:<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><script type="text/javascript" src="./js/jquery-1.2.2.pack.js" ></script><style>.sidebtn { background: url(./img/list.gif) no-repeat top left; height: 16px; margin: 0
阅读全文
摘要:1. $("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发2. var checkText=$("#select_id").find("option:selected").text(); //获取Select选择的Text3. var checkValue=$("#select_id").val(); //获取Select选择的Value4. var checkIndex=$("#select_id ").
阅读全文
摘要:$('#frame_rate1 option:eq(0)').remove(); //jQuery实现删除option控件下的元素 frame_rate1是select 的ID $('#frame_rate1 option:eq('+ i +')').remove(); //i表示变量function remove_option(minvalue,maxvalue,first_value){ for(i=minvalue ; i<=maxvalue; i++) { $('#frame_rate1 optio...
阅读全文
摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> 使用jQuery解决IE不支持的option disable属性 </title> <meta http-equ
阅读全文
摘要:<script type="text/javascript" src="./js/jquery-1.2.2.pack.js" ></script>function judge() //判断idstream_number里的值。然后根据这个值设置div里的内容是否显示。 { var stream_number_value=document.getElementById("stream_number").value; if(stream_number_value==0) { $('#stream_j...
阅读全文