Write a player for review. Because Ajax involves cross-origin weather information retrieval, there are two versions, one is direct cross-origin, IE10 supports, and the other browsers need to modify the configuration to test the software engineering at night, I really don't want to review it. Write a player. This is just a small Demo for learning. For many imperfections, the source code is posted below. If you want to reprint it, add a copyright statement.
PS: Because Ajax involves cross-origin weather information retrieval, there are two versions, one is direct cross-origin, IE10 supports, other browsers need to change the configuration. The other is weather. php on the server side, which returns json for weather information.
Weather. php will not be written, and the corresponding path in it will store the corresponding file
Demo address:
Http://569375.ichengyun.net/fm/
Functions:
Music playback, progress adjustment (sliding module), volume conditions, Random music selection, background image, picture pre-loading, music pre-loading, weather Ajax acquisition
The music list is processed in json format (it can also be understood as a hash table)
The Code is as follows:
Music and weather