美文网首页
改bug遇到的坑---集合

改bug遇到的坑---集合

作者: 有一个程序媛 | 来源:发表于2018-05-15 09:24 被阅读0次

1.曾亲自使用过prop()的地方,切记不能使用attr()

select: option.prop("selected", true);

checkbox:$("#xxx").prop("checked")

disabled :$(this).prop("disabled", false);

2.小div在大div中水平垂直居中

.parent {

            width:800px;

            height:500px;

            border:2px solid #000;

            display:flex;

            justify-content:center;

            align-items:center;

        }

        .child {

            width:200px;

            height:200px;

            background-color: red;

        }

3.单选按钮实现不了单选

<input type="radio">同意

<input type="radio">驳回

为什么实现不了单选。原因是他们要有相同的name值,但是我脑子一糊涂搞忘了,找了挺久的

<input type="radio" name="radio"> 同意

<input type="radio" name="radio">驳回

相关文章

网友评论

      本文标题:改bug遇到的坑---集合

      本文链接:https://www.haomeiwen.com/subject/jkqedftx.html