qiu0130

CoffeeScript 怎么给<input class="input1"/> 添加属性

  •  
  •   qiu0130 · Oct 17, 2016 · 2407 views
    This topic created in 3572 days ago, the information mentioned may be changed or developed.

    例如:

    <input class="input1">

    添加 type="text"

    改怎么做?

    不懂前端,没接触过的 CoffeeScript.

    4 replies    2016-10-18 09:34:08 +08:00
    zythum
        1
    zythum  
       Oct 17, 2016   ❤️ 1
    ```
    document.querySelector '.input1'
    .setAttribute 'type', 'text'
    ```

    话说啥都不会呢。就别用 coffee 这种东西了,好好写 js 去。
    aliuwr
        2
    aliuwr  
       Oct 17, 2016
    @zythum 朱一姐姐还是这么不辞辛苦,乐于助人
    qiu0130
        3
    qiu0130  
    OP
       Oct 18, 2016
    @zythum 真是啥也不会呀, 需要的开源组件是 coffee 写的, 我入坑了。
    BTW, 我是写 python 的,
    qiu0130
        4
    qiu0130  
    OP
       Oct 18, 2016
    @aliuwr 姐姐一定很漂亮。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5392 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 07:17 · PVG 15:17 · LAX 00:17 · JFK 03:17
    ♥ Do have faith in what you're doing.