随笔分类 -  javascript

Google 开发console查找元素或方法
摘要:F12 后 在console中输入: $("#R")[0] 查找ID 为R的元素, 如需打印出元素属性值,则输入: console.dir($("#R")[0]) 查找方法则 在source选择项目,右键search in folder, 输入方法名即可 阅读全文

posted @ 2020-05-22 17:31 卖肾割阑尾 阅读(865) 评论(0) 推荐(0)

undefined与null的区别
摘要:Is there a universal JavaScript function that checks that a variable has a value and ensures that it's not undefined or null? I've got this code, but 阅读全文

posted @ 2018-08-22 11:29 卖肾割阑尾 阅读(104) 评论(0) 推荐(0)

java 捕获组与非捕获组
摘要:非捕获组:格式:(?:xxxx), 如:(?:aaa)\\w+(bbb)\\1,\\1 代表重复捕获的第一组即是(bbb) public static void main(String[] args) { String str = "fooccccbarbarbarfo"; Pattern p = 阅读全文

posted @ 2018-03-28 14:53 卖肾割阑尾 阅读(179) 评论(0) 推荐(0)

Js 常用正则表达式
摘要:Matches according to the following rules:A backslash that precedes a non-special character indicates that the next character is special and is not to 阅读全文

posted @ 2018-03-28 14:40 卖肾割阑尾 阅读(133) 评论(0) 推荐(0)

Ajax 与 Struts 1
摘要:Xml配置 <action path="/product/product/validateCurrencyDecimalSupport" type="com.neulion.iptv.ui.struts.AdvancedAction" parameter="validateCurrencyDecim 阅读全文

posted @ 2018-01-12 18:31 卖肾割阑尾 阅读(142) 评论(0) 推荐(0)

Js/jquery常用
摘要:id属性不能有空格 1. js判断checkebox是否被选中 var ischecked = document.getElementById("xxx").checked //返回false or true 设置选上/不选:document.getElementById("xxx").checke 阅读全文

posted @ 2017-12-08 18:15 卖肾割阑尾 阅读(133) 评论(0) 推荐(0)

XStream和Json
摘要:XStream的作用 XStream可以把JavaBean对象转换成XML! 通常服务器向客户端响应的数据都是来自数据库的一组对象,而我们不能直接把对象响应给响应端,所以我们需要把对象转换成XML再响应给客户端,这时就需要使用XStream组合了。 2 XStream入门 为了演示XStream的作用,我们需要先写两个类,Province和City。 City.java public cla... 阅读全文

posted @ 2015-09-08 22:34 卖肾割阑尾 阅读(349) 评论(0) 推荐(0)

省市联动
摘要:ajax.jsp My JSP 'ajax5.jsp' starting page --> 省市联动 ProvinceServlet.java package cn.itcast.web.servlet; import java.io.IOException; import java.io.InputStream; import ... 阅读全文

posted @ 2015-09-08 18:59 卖肾割阑尾 阅读(264) 评论(0) 推荐(0)

ajax
摘要:1. ajax是什么? * asynchronous javascript and xml:异步的js和xml * 它能使用js访问服务器,而且是异步访问! * 服务器给客户端的响应一般是整个页面,一个html完整页面!但在ajax中因为是局部刷新,那么服务器就不用再响应整个页面!而只是数据! > 阅读全文

posted @ 2015-09-08 13:28 卖肾割阑尾 阅读(112) 评论(0) 推荐(0)

导航