zoukankan      html  css  js  c++  java
  • 遇到容易忘记的问题(三)

    遇到容易忘记的问题(二)

    11. js获取name

     <lable>
        <span id="onlinePerson" name="person" onclick="changeImg(this)" >
          <img id="imgPerson" src="images/invote-checked.png">个人
       </span>
     </lable>
    function changeImg(obj) {
        // console.log(obj.name); //错误的只支持obj.id
        // $(obj).attr("name"); //jquery写法
        console.log(obj.getAttribute("name"));
    }

    12.webstorm多个项目同时显示,原来经常会用得到,但是总是忘记,今天就在这备忘了。再也不用担心遇到在哪里打开“this window” 或者“new window”:

    File -> settings -> Directories -> Add Content Root 添加新项目->确定即可。

      

     13.多行文本框(文本域)编辑需要高度自适应, 改变不了<textarea>的样式, 只能用<div>模仿了, 使用contenteditable 属性,来规定元素内容是否可编辑。

    <div class="liketextarea" contenteditable="true" ></div>
    .liketextarea{
         100%;
        min-height: 1.6rem;
        border: none;
        background: transparent;
        outline: none;
        font-size: .26rem;
        color: #1c1c1c;
        line-height: .44rem;
    }
  • 相关阅读:
    mysql分组排序取组内第一的数据行
    C#版Nebula客户端编译
    关于nginx
    http状态码
    gitlab
    TCP/IP 3次握手和四次断开
    nps 内网穿透
    用CentOS7做一个简单的路由器
    linux 简单特效
    LVS粗讲
  • 原文地址:https://www.cnblogs.com/wangduojing/p/10397020.html
Copyright © 2011-2022 走看看