这个Javascript变量的目的是什么?

时间:2011-07-11 23:35:02

标签: javascript

这是做什么的,为什么这样宣布?

   var shroom = 'data:image/gif;base64,R0lGODlhgACAAPcAAAAAAEvlS////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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LfZEXxso2dho67wZ2BWm7fZCZWO49ttux+313HSjbfd6eOf/LfbeD/btN9eAd/3awcamGfLgKB0uZOJxvsm4S44r3nKekk/u7JORA4y555p3VHnnkH9eeugcjW764qtfjvpEqjMUe6CZv5567a2fnPvMcILo8Om0gx78tNAlSXO+lusu+7nFZ3n8bYizvry2MBkvOvOkSz98rA3O97v2lwofPvHVO3899bt7+Wv3Fz5PW/Sub498+fyJDP3j4K/fPHb4e8wolj+Bn//4BECdCHCAbCpgTg6IQP35RDfJa6ADYQTB7EmQTArECQMvyD0oVTB9HJwfBZVjvxACZ38G/N4FPxQUFUqQhSzZnAlhyL8SmnAs7JOJDENIQ5XskIM9PIoNLm8YRA3arneOAdMR0ZREJS5xKE00yBOREsXHTLExUbwiFpuoxb5UcSBdLAxLAgIAOw%3D%3D';

4 个答案:

答案 0 :(得分:7)

它表示以base 64编码的GIF图像。

答案 1 :(得分:1)

答案 2 :(得分:0)

这是一个数据URI,它是一个以URL编码的文件。更多信息可以在维基百科上找到。这是一个用于创建它们的在线工具: http://software.hixie.ch/utilities/cgi/data/data

我相信IE并不完全支持数据URI,所以它们并不常用。但是,如果IE确实如此,它们对于嵌入样式表的图标和小图形非常有用。

答案 3 :(得分:0)

这是使用Javascript

编码base 64的链接

Base 64 with Javascript