jQuery
Lenux2017
Java开发
展开
-
jQuery文本值转数字的计算
//测试价格少于36,自动+6 $("#price").blur(function(){ alert("price") var p1=document.getElementById("price").value; if (p1<36) { $("#price").val(p1*1+6);//p1*1将p1原来的String类型转为int //也可以写作var原创 2017-09-21 22:31:07 · 5332 阅读 · 0 评论 -
jQuey表单重置
//重置功能 function resetForm(){ $("#form1")[0].reset();//重置表单 search();//再次加载不带条件的table }*原创 2017-09-21 22:26:23 · 263 阅读 · 0 评论 -
jQuery单选框的回显
//单选框回显$("input[name='goodsBean.status']").each(function (){ var str = $(this).val(); if (str == data.status+"") { $(this).attr("checked",true); }});原创 2017-09-21 22:25:28 · 3007 阅读 · 0 评论 -
jQuery artDialog模态窗口
//模态窗口 $("#bt1").click(function (){ var add_from = dialog({ title: '新增订单',//标题 content:$("#div1"),//展示内容,getDivByUrl('跳转页面url')// height:"300px",// width原创 2017-09-21 22:32:38 · 1371 阅读 · 0 评论