// 1. toString() var num = 8; var numString = num.toString(); console.log(numString); var result = true; var resultString = result.toString(); console.log(resultString); // toString 中的参数代表进制 console.log(num.toString(10)) // 2.String() var num1 = 8; v
/*** Created by 张云山 on 2016/12/9.*/(function(wins,doct){wins.fasicon = function(){this.name = "fasicon构造体";this.Explain_text = "构造说明,详情查看请实例化:[new fasicon().Explain()]查看";};fasicon.prototype = {Explain:function(){arguments.callee.Expla
<script> var CalendarData=new Array(20); var madd=new Array(12); var TheDate=new Date(); var numString="一二三四五六七八九十"; var monString="正二三四五六七八九十冬腊"; var weekString="日一二三四五六"; var cYear; var cMonth; var cDay; var cHour; va
获取当前阳历日期时间,阴历日期和星期,三者分开,可自行调整顺序. 新建JS文件getdates.js,代码如下:/*获取当前阳历日期*/function getCurrentDateTime() { var d = new Date(); var year = d.getFullYear(); var month = d.getMonth() + 1; var date = d.getDate(); /*时分秒*//**********************var hours = d.get
/* var bsYear; var bsDate; var bsWeek; var arrLen=8; //数组长度 var sValue=0; //当年的秒数 var dayiy=0; //当年第几天 var miy=0; //月份的下标 var iyear=0; //年份标记 var dayim=0; //当月第几天 var spd=86400; //每天的秒数 var year1999="30;29;29;30;29;29;30;29;30;30;30;29"; //354 v