【发布时间】:2011-05-28 06:40:05
【问题描述】:
用&&返回值是什么意思?
else if (document.defaultView && document.defaultView.getComputedStyle) {
// It uses the traditional ' text-align' style of rule writing,
// instead of textAlign
name = name.replace(/([A-Z]) /g, " -$1" );
name = name.toLowerCase();
// Get the style object and get the value of the property (if it exists)
var s = document.defaultView.getComputedStyle(elem, " ") ;
return s && s.getPropertyValue(name) ;
【问题讨论】:
-
只是为了澄清:您不会返回带有
&&的值,而是返回基于其他值的值。 :)
标签: javascript operators return