ITeye博客

2009 年文章归档

共 2 篇文章

常用的java函数

/** * 将某个日期以固定格式转化成字符串 * * @param date * @return String */ public static String dateToStr(java.util.Date date) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String str = sdf.format(date); return str; } /** * 判断任意一个整数是否素数 * * @param n * @return boolean */ public static boolea…

2009-02-07 20:36 · Java

html table insert/delete rows

Deleting table rows < html > <head> <script type="text/javascript"> function deleteRow(i){ document.getElementById('myTable').deleteRow(i) } </script> </head> < body > <table id="myTable" border="1"> <tr> <td>Row 1</td> <td><input type="button" value="Delete" onclick="deleteRow(this.parentNode.pare…

2009-02-07 20:31 · Web应用