码迷,mamicode.com
首页 >  
搜索关键字:tostring    ( 5990个结果
js对特殊字符转义、时间格式化、获取URL参数
/*特殊字符转义*/function replace_html(str) {var str = str.toString().replace(/&/g, "&").replace(//g, ">").replace(/"/g, '"');return str;}/**时间格式...
分类:Web程序   时间:2016-01-09 22:55:48    阅读次数:403
Object需要复写的方法
Object作为对象中的上帝,我们时刻关注着上帝中的行为。但是上帝之手有时候还不太好用,所以我们有时候要进行复写。public String toString(){ //code}public boolean equals(Object obj){ // obj 强转 // 比较...
分类:其他好文   时间:2016-01-09 16:41:16    阅读次数:106
js取当前页面名称
// 取当前页面名称(不带后缀名) function pageName() { var a = location.href; var b = a.split("/"); var c = b.slice(b.length-1, b.length).toString(String).split(".")...
分类:Web程序   时间:2016-01-09 15:07:47    阅读次数:129
VB.NET 创建文件以及文件的读写
创建文件Dim strFile As String = String.Format("C:\ErrorLog.txt", DateTime.Today.ToString("dd-MMM-yyyy"))File.AppendAllText(strFile, String.Format("Error M...
分类:Web程序   时间:2016-01-08 13:09:26    阅读次数:509
c# 保存数据到txt (追加)
StringBuilder sb = new StringBuilder(); sb.AppendLine(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + " " + arg0 ); System.IO.File...
分类:Windows程序   时间:2016-01-08 10:26:24    阅读次数:247
java22:API-Object-String
Object类顶级toString()方法一般都要重写返回对象文本描述被很多API调用==比较变量的值,引用变量的值是地址值,引用变量==比较的是地址值不能用于比较逻辑上对象是否相等equals方法一般要重写(重写时也要重写hashCode方法)Object的equals方法用于对象的相等逻辑instanceofja..
分类:编程语言   时间:2016-01-07 20:23:39    阅读次数:308
DateTime.Now.ToString()的各种字符串
C#中的日期处理函数 //2007年4月24日 this.TextBox6.Text = System.DateTime.Now.ToString("D"); //2007-4-24 this.TextBox7.Text = System.DateTime.Now.T...
分类:其他好文   时间:2016-01-06 23:13:20    阅读次数:220
c#中取整,向上取,向下取
Math.Ceiling()向上取整,Math.Floor()向下取整 示例: d = 4.56789 Math.Ceiling(Convert.ToDecimal(d)).ToString();Math.Ceiling(Convert.ToDouble(d)).ToString();Math.Fl...
分类:Windows程序   时间:2016-01-05 22:31:56    阅读次数:265
datagridview分页后checkbox列的value值为null
datagridview分页后checkbox列的value值为nullstring b = Describ_dataGridView.Rows[i].Cells[0].Value.ToString();//不会报错,但是取不到值解决方法:1。string b = Describ_dataGridV...
分类:Windows程序   时间:2016-01-05 12:19:37    阅读次数:443
js控制精度的加减乘除
//加法函数 function accAdd(arg1, arg2) { var r1, r2, m; try { r1 = arg1.toString().split(".")[1].length; ...
分类:Web程序   时间:2016-01-04 10:05:43    阅读次数:207
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!