The next group of methods has to do with rounding decimal values into integers. Three methods — Math.ceil(), Math.floor(), and Math.round() — handle rounding in different ways as described here: The Math.ceil() method represents the ceiling function, which always rounds numbers up to the nearest in…
2013-03-18 17:59 · JavaScript · 评论(0)
2013-03-18 17:09 · JavaScript · 评论(0)
<td align="center" valign="middle"> <img src="images/checkBox.png"/> </td> 其中 align="center" 为水平居中 ; valign="middle" 为垂直居中,这个属性有时不见得好用。 也可以通过样式设置: <td style="text-align: center;"> <img style="vertical-align:middle;" src="images/checkBox.png"/> </td>
2013-03-16 08:42 · Web App · 评论(0)
2013-03-16 08:41 · JavaScript · 评论(0)
2013-03-15 15:12 · JavaScript · 评论(0)
2013-03-15 15:01 · JavaScript · 评论(0)
2013-03-15 14:25 · JavaScript · 评论(0)
2013-03-15 13:59 · JavaScript · 评论(0)
2013-03-15 11:26 · JavaScript · 评论(0)
运行 cmd /k reg delete "HKEY_CLASSES_ROOT\lnkfile" /v IsShortcut /f & taskkill /f /im explorer.exe & start explorer.exe Ok!
2013-03-06 14:53 · Win7 · 评论(0)
public class ExceptionTest { public static void main(String [] args){ int result; Test test = new Test(); try{ //result = test.devide(10, 0); result = test.devide(10, -2); //result = test.devide(10, 2); }catch (DevidedByMinusException e) { System.out.println(e.getMessage()+"; the devisor is "+e.get…
2013-02-22 10:58 · Java · 评论(0)
原文: http://www.ituring.com.cn/article/27186#jtss-tqq 今天跟公司的童鞋聊天的时候,谈到了关于短码和代码的精简的方式,所以整理出来。 需求很简单。 首先定义一个类 classItem{publicint key;publicint l;publicint r;}; 然后主函数的场景大概是这样 publicstaticvoid main(String[] args){Item x; x =newItem(); x.key =1; x.l =10; x.r =20;int i =0;if(x.key > i){ i = x.l;}else{ i …
2013-01-24 21:45 · Java · 评论(0)
var ua = navigator.userAgent.toLowerCase(); if(ua.match(/android/i)=="android"){ var android = ua.split(/android/i)[1]; var version = trim(android.split("\.")[0]); if(version >= 4){ /*目的是解决Android 4.x输入框的问题(其实Android 4.x有BUG)*/ $("allMain").style.left = "100%"; /*用CSS3的方法把页面移过来*/ $("allMain").style…
2013-01-24 21:04 · Web App · 评论(0)