Home > Article > Web Front-end > JS HTML5 music weather player (Ajax to obtain weather information)_javascript skills
I have a software engineering exam tonight and I really don’t want to review. Write a player. This is just a small demo for learning. There are many imperfections. The source code is posted below. If you want to reprint, please add a copyright statement
PS: Because Ajax involves cross-border There are two versions for obtaining weather information from a domain. One is directly cross-domain and is supported by IE10. Other browsers need to change the configuration. The other is weather.php on the server side, which gets weather information and returns json.
weather.php will not be written, the corresponding path inside stores the corresponding file
Demo address:
http://569375.ichengyun.net/fm/
Functions implemented:
Music playback, progress adjustment (sliding module), volume conditions, random music selection, background images, image preloading, music preloading, weather Ajax acquisition
JSON processing used for music lists (can also be understood as hash tables)
喜欢一个人
不难
被同一个人喜欢
好难