我正在使用下面的堆栈建立一个网站。对于这个问题,我认为软件栈应该无关紧要。我更感兴趣的是,我做这个项目的方式是一个好主意,还是遵循了最佳实践。
- Twitter Bootstrap for the UI
- CherryPy
- jQuery
所以我处理这个项目的方式如下所示
- Use the Twitter Bootstrap to create the basic layout
- I have one js file and one css file for my project
- Based upon the requirement, let say for this butt
我对javascript还是个新手,所以我不确定如何将这个用actionscript3编写的函数重写成js:
function map(v:Number, a:Number, b:Number, x:Number = 0, y:Number = 1):Number {
return (v == a) ? x : (v - a) * (y - x) / (b - a) + x;
}
它在javascript中会是什么样子?现在这种方法不起作用的确切原因是什么?