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.
我想知道如何使用 js/jQuery 读取包含 HEX 颜色的 conf 文件?我想我将不得不使用 Ajax GET 请求来完成它。以及如何以适当的方式解决我将遇到的“跨域”/“同源”安全问题?!提前致谢。
两种选择:以某种方式返回正确的 CORS 标头,或者使用服务器而不是 jQuery 请求文件。
编辑:也就是说,如果它确实是一个跨域请求。