首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
V2EX
›
前端开发
CoffeeScript 怎么给<input class="input1"/> 添加属性
qiu0130
·
2016-10-17 20:58:54 +08:00
· 1827 次点击
这是一个创建于 2798 天前的主题,其中的信息可能已经有所发展或是发生改变。
例如:
<input class="input1">
添加 type="text"
改怎么做?
不懂前端,没接触过的 CoffeeScript.
input1
input
class
添加
4 条回复
•
2016-10-18 09:34:08 +08:00
1
zythum
2016-10-17 21:25:25 +08:00
1
```
document.querySelector '.input1'
.setAttribute 'type', 'text'
```
话说啥都不会呢。就别用 coffee 这种东西了,好好写 js 去。
2
aliuwr
2016-10-17 21:31:17 +08:00
@
zythum
朱一姐姐还是这么不辞辛苦,乐于助人
3
qiu0130
OP
2016-10-18 09:26:33 +08:00
@
zythum
真是啥也不会呀, 需要的开源组件是 coffee 写的, 我入坑了。
BTW, 我是写 python 的,
4
qiu0130
OP
2016-10-18 09:34:08 +08:00
@
aliuwr
姐姐一定很漂亮。
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
实用小工具
·
926 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 26ms ·
UTC 20:59
·
PVG 04:59
·
LAX 13:59
·
JFK 16:59
Developed with
CodeLauncher
♥ Do have faith in what you're doing.