![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
html
dmwhw
这个作者很懒,什么都没留下…
展开
-
让html元素水平居中
使用自适应边界(auto margin) 水平居中任意元素的首选办法是使用边界(margin)性质(property),并把左右之值设置为auto。但你必须为#container指定一个宽度。div#container {margin-left: auto;margin-right: auto;width: 168px;} 这个方案在任何当代浏览器上都有转载 2015-11-07 10:17:47 · 328 阅读 · 0 评论 -
jq的.html()插入失败
在做网页时,发现这个老是插不进去$.post("getProvince.do","",function(data){var str="";for(var key in data){str=str + ""+data[key]+"";}$("#tab-ul").html(str); info(data[0]);},"json");原创 2015-11-07 10:20:04 · 1035 阅读 · 0 评论 -
window.location.href不转跳的解决方法 与a标签空链接有关
location.href不跳转的解决办法相信很多人通过链接的onclick事件做跳转操作时,出现location.href不跳转的问题,下面对onclick事件中location.href的几种测试,来解决这个location.href不跳转的问题。 function ToUrl(x) { location.href=x; } location.href转载 2015-11-10 00:12:27 · 3397 阅读 · 1 评论 -
在使用select标签,请老老实实使用document.getElementById()
var p=document.getElementById("p"); //不能用jqvar c=document.getElementById("c");原来用$("|#id").options[] 老是说得不到object,这个是jq的问题啦。。。现在可以设置一个隐藏域,提交前先让隐藏域获得select的值,然后就可以序列化表单传到springmvc原创 2015-11-07 11:23:57 · 2100 阅读 · 0 评论