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.
如果我有一些页面,例如:(home.html、about.html 等),我如何将这些页面插入到对象中以供将来使用?换句话说,我想缓存这些页面:
var obj= {"home":home.html, "about": about.html};
这是正确的方法吗?
var obj= {"home": "home.html", "about": "about.html"}; alert( obj.about ); // about.html