早教吧 育儿知识 作业答案 考试题库 百科 知识分享

求助parseInt(o.style.zoom,10)||100;是什么意思varzoom=parseInt(o.style.zoom,10)||100;zoom+=event.wheelDelta/12;if(zoom>0)o.style.zoom=zoom+'%';

题目详情
求助parseInt(o.style.zoom,10)||100;是什么意思
var zoom=parseInt(o.style.zoom,10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
▼优质解答
答案和解析
parseInt(o.style.zoom, 10) 里面的10只是把o,style.zoom转换成10进制而已
parseInt(o.style.zoom, 10)||100; 这个是个逻辑或的运算