摘要: //ueditor有标签文本 function getContent() { var arr = []; arr.push(UE.getEditor('editor').getContent()); return arr.join(""); } ... 阅读全文
posted @ 2019-06-17 16:44 yvioo 阅读(2320) 评论(0) 推荐(0)
摘要: /** * 获取指定日期是星期几<br> * * @param date * @return 指定日期是星期几 */ public static String getWeekOfDate(Date date) { String[] weekDays = { "星期日", "星期一", "星期二", 阅读全文
posted @ 2019-05-24 15:23 yvioo 阅读(17819) 评论(0) 推荐(0)
摘要: 可能是应该返回内容带了标签,过滤下 这样就可以了 阅读全文
posted @ 2019-05-08 18:12 yvioo 阅读(781) 评论(0) 推荐(0)
摘要: public static Map getLngAndLat(String address) { Map map = new HashMap(); String url = "http://api.map.baidu.com/geocoder/v2/?address=" + address + "&output=json&ak=你的ak"; //这里需要自己申... 阅读全文
posted @ 2019-05-03 15:34 yvioo 阅读(3529) 评论(0) 推荐(0)
摘要: //java 通过url下载图片保存到本地 public static void download(String urlString, int i) throws Exception { // 构造URL URL url = new URL(urlString); // 打开连接 URLConnection con = u... 阅读全文
posted @ 2019-05-03 15:31 yvioo 阅读(27332) 评论(0) 推荐(3)
摘要: 首先先要导入pinyin4j-2.5.0.jar 这个jar包 阅读全文
posted @ 2019-05-03 15:31 yvioo 阅读(449) 评论(0) 推荐(0)
摘要: public static String getSixNum() { String str = "0123456789"; StringBuilder sb = new StringBuilder(4); for (int i = 0; i < 6; i++) { char ch = str.charAt(new Random().nextInt(str.length()));... 阅读全文
posted @ 2019-05-03 15:24 yvioo 阅读(2500) 评论(0) 推荐(0)
摘要: 通过判断浏览器的userAgent,用正则来判断是否是ios和Android客户端。代码如下: <script type="text/javascript"> var u = navigator.userAgent; var isAndroid = u.indexOf('Android') > -1 阅读全文
posted @ 2019-05-03 15:23 yvioo 阅读(2779) 评论(0) 推荐(0)
摘要: Enumeration<String> paraNames=request.getParameterNames(); for(Enumeration<String> e=paraNames;e.hasMoreElements()){ String thisName=e.nextElement()+" 阅读全文
posted @ 2019-05-03 15:19 yvioo 阅读(8108) 评论(0) 推荐(0)
摘要: function isDate8(sDate) { if (!/^[0-9]{8}$/.test(sDate)) { return false; } var year, month, day; year = sDate.substring(0, 4); month = sDate.... 阅读全文
posted @ 2019-05-03 15:17 yvioo 阅读(2208) 评论(0) 推荐(0)