Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 PHP 中,我们这样做:
function($param) { $this->{$param}; }
我们如何在 JavaScript 中做到这一点?
我不了解 PHP,但您可以使用方括号表示法来访问属性。
function(param) { this[param]; }
在javascript中你可以这样写
function House(rooms,price,garage) { this.rooms=rooms; this.price=price; this.garage=garage; }
我想在背景图像之上申请.page-header .icon1
.page-header .icon1
例如:http: //jsfiddle.net/fR5F6/
<table>应该在橙色图像的顶部。
<table>
怎么做到呢?
<div class=