qiu0130

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

  •  
  •   qiu0130 · Oct 17, 2016 · 2591 views
    This topic created in 3682 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
    zythum
    Oct 17, 2016❤️1
    1
    ```
    document.querySelector '.input1'
    .setAttribute 'type', 'text'
    ```

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