随笔分类 - JavaScript
摘要:/** * 获取某月最后一天 * @param year * @param month * @returns {number} */ getLastDay(year, month) { var new_year = year; //取当前的年份 var new_month = month++;//取
阅读全文
摘要:el-select 默认值显示value不显示label问题在做编辑页面时需要取到列表项数据回显默认值在做select回显的时候遇到了这个问题 明明拿到的值和value中的值一样但是就是不转换成label这种情况一般出现在value为数字的情况 原因是 返回的数字和el-option选框里value
阅读全文
摘要:<el-form-item label="主厨描述"> <el-input v-model="chef_desc" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" maxlength="128" @input="descInput" pla
阅读全文
摘要:全选 ID 企业 名称 手机号 Email 类型 ...
阅读全文
摘要:1 js 通过正则表达式对手机号进行验证 2 3 var reg = /^1[3|4|5|8][0-9]\d{4,8}$/; 4 var sMobile = document.mobileform.mobile.value; 5 if(!(reg.test(sMobile))){ 6 alert("不是完整的11位手机号或者正确的手机号前七位")...
阅读全文
摘要:1 1.将时间(2017-08-10)转换时间戳 2 var startTime = '2017-08-10'; 3 var startdate = new Date(Date.parse(startTime.replace(/-/g, "/"))); 4 startdate = startdate.getTime() / 1000; 5 alert(startdate) 6 7...
阅读全文
摘要:<script type="text/javascript"> function getcitytext(){ citytext = ''; $(".citylist select").each(function(){ if($(this).val()>0){ citytext += $(this)
阅读全文
摘要:<div id="k">测试</div><script>setTimeout("document.getElementById('k').style.display='none'",5000);</script>
阅读全文
摘要:HTML: <div class="form-group field-company-state"> <div style="width:1000px;height:500px;border:0px solid gray" id="container"></div></div>php: $model
阅读全文
摘要:HTML:地图的大小显示<div class="form-group field-company-state"> <label class="control-label col-sm-2" for="company-state"></label> <div style="width:400px;he
阅读全文
摘要:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html> <head> <meta http-equiv="Content-Type" content="text/
阅读全文