JavaScript
文章平均质量分 71
TomLoong
前端
展开
-
关于AJAX的使用方法
1.url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址。2.type: 要求为String类型的参数,请求方式(post或get)默认为get。注意其他http请求方法,例如put和delete也可以使用,但仅部分浏览器支持。3.timeout: 要求为Number类型的参数,设置请求超时时间(毫秒)。此设置将覆盖$.ajaxSetup()方法的转载 2017-07-26 14:30:20 · 404 阅读 · 0 评论 -
关于搜索Enter执行查询的方法
input type="text" name="keyword" id="searchword" value="11" maxlength="20" onkeyup="searchenter1(event);"/>//方法名,函数名function searchenter1(event) {//判断是不是事件event = event || window.event;/转载 2017-07-28 13:54:29 · 1123 阅读 · 0 评论 -
jquery获取当前页面的URL信息
设置或获取对象指定的文件名或路径。window.location.pathname例:http://localhost:8086/topic/index?topicId=361alert(window.location.pathname); 则输出:/topic/index设置或获取整个 URL 为字符串。window.location.href例:http://localhost:8086/to...转载 2018-03-15 15:21:22 · 1556 阅读 · 0 评论