tofixed: 四舍五入为指定小数位数的数字
tofixed(number) tofixed(2) 意四舍五入的位数为两位
jQuery 1.6 开始新增了一个方法 prop();
1.添加属性名称该属性就会生效应该使用prop();
2.是有true,false两个属性使用prop();
3.其他则使用attr();
注:根据官方的建议具有 true 和 false 两个属性的属性,如 checked, selected 或者 disabled 使用prop(),其他的使用 attr()
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/887/viewspace-2815873/ ,如需转载,请注明出处,否则将追究法律责任。