- 博客(5)
- 收藏
- 关注
原创 jQuery中width(),innerWidth(),outerWidth(),outWidth(true)的区别
var w='元素本身的宽度';width()==w;innerWidth()==w+padding;outerWidth()==w+padding+border;outerWidth(true)==w+padding+border+margin;注意:这些方法只用于jQuery
2018-07-27 14:32:38 873
原创 window.history.go()和history.back()以及location.reload()的用法以及不同
window.history.go(-1); 返回上一页, 原页面表单中的内容会丢失;window.history.back(-1); 返回上一页, 原页面表单中的内容会保留.以下为举例:<input type="button" value="刷新" onclick="window.location.reload()"><input type="butto...
2018-07-20 10:32:55 12328
转载 用js如何获取UA(user Agent)用户代理?
<!DOCtype html> <html> <head> <title></title> </head> <body onload="whatBrowser()"> <script> function whatBrowser()
2018-07-17 14:20:18 2212
原创 URL调用高德地图导航
http://uri.amap.com/navigation?from=" + fromLongitude + "," + fromLatitude + "&to="+ longitude + "," + latitude + "&mode=car&src=nyx_super;fromLongitude ,fromLatitude : 起始点经纬度longitud...
2018-07-04 19:37:42 9614 1
原创 关于a标签的click事件
推荐写法 <a href="javascript:void(0)" onclick="doSomething()">链接</a> javascript:void(0) 相当于一个死链接,href 不执行
2018-07-04 14:26:27 9253
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人