$(function(){ $('.mainall').textbox({}); var r = 5; r=r==2&&r*8||r*3; alert(r); });
&&、||组合代替了if else 而显得便捷。
posted on 2017-11-16 15:54 ckx0709 阅读(613) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 ckx0709 Powered by .NET 9.0 on Kubernetes