HTML小知识点


1.怎样让input单选按钮的值不可修改,不能用disable属性,使用disable属性的话 提交表单 这个值就提交不到后台了

如何让输入框中默认的值不被删除?
readonly="readonly"
在input type=”text“ 这个输入框中限制输入的值不被删除
$("#id").attr('disabled',false);这个也可以

 

2.input点击输入框内容清空

<input type="text" onclick="this.value=''">

 

3.css

子div在父div的相对定位css控制:

父div的position使用relative,子div的position使用absolute,然后使用left和top进行定位。

如果子div的position使用了fixed,就不能使用left了,则改成margin-left。

 

posted on 2015-03-15 11:28  Tenory  阅读(190)  评论(0编辑  收藏  举报