
js
小峰83
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
简单ajax
前台:<script>$(function(){ var projectId = $V("projectId"); $.ajax({ url : '../../../ZdyPmProjectInfo.project/qrCode?projectId='+projectId, dataType : 'json', ...原创 2018-08-30 09:40:27 · 138 阅读 · 0 评论 -
js执行一个方法,跳转至上一个页面刷新
window.location.href=document.referrer; window.location.href=document.history.go(-1);原创 2018-08-29 09:40:56 · 684 阅读 · 0 评论 -
执行click事件
1、比如,我们要弹出一个网页:http://www.cuplayer.com,那么可以 构造: <a id="openWin" href="http://www.cuplayer.com"></a> 然后写脚本, JS写法:document.getElementById('openWin').click(); ...原创 2018-08-29 09:41:00 · 1168 阅读 · 0 评论 -
js比较日期大小
var startDate = $("#datetime1").val(); var endDate = $("#datetime2").val(); if(startDate!=null && startDate!="" && endDate!=null && endDate!=""){原创 2018-08-29 09:41:07 · 6054 阅读 · 0 评论 -
js获取当前日期前一个月
不补0<script>var myDate=new Date();alert(myDate.getFullYear() + "-" + (myDate.getMonth()+1) + "-" + myDate.getDate());myDate.setMonth(myDate.getMonth()-1);alert(myDate.getFullYear() +...原创 2018-08-29 09:41:17 · 26070 阅读 · 3 评论 -
判断复选框是否选中
<input type="checkbox" id="commentTypeCheck" name="commentTypeCheck" onclick="isCheck(this);"/> 匿名方法一:function isCheck(obj){if ($(obj).attr('checked')) { alert("yes")}else{alert原创 2018-08-29 09:41:22 · 190 阅读 · 0 评论 -
判断元素是否为未定义
var s2 = $("input[name='timSection']:checked").val(); if (typeof(s2) == "undefined") { alert(1) }else{ alert(2) }原创 2018-08-29 09:41:31 · 523 阅读 · 0 评论 -
单引号,双引号拼接
arr.push("<div class='leftDiv' style='color:#b3b3b3;' onclick='messageDetail("+id+",1,this);'>");原创 2018-08-29 09:41:36 · 802 阅读 · 0 评论 -
js push 转义
arr.push(" 个下载币"+ "</div><a style='width:20px;height:20px;cursor:pointer;' onclick='editCourseWare("+id+");'>编辑 </a>"+ "<a style='width:20px;height:20px;cursor:poin原创 2018-08-29 09:41:42 · 416 阅读 · 0 评论 -
ajax data
/* $(function(){ $.ajax({ type: "POST", async:false, url: "${pageContext.request.contextPath }/webSitesAJAX.action", //后台地址 ...原创 2018-08-30 09:40:22 · 233 阅读 · 0 评论 -
数字保留几位小数,默认补0
profitPercentFormat:function(value){return value.toFixed(6);}原创 2018-08-29 09:40:50 · 986 阅读 · 0 评论