Home > Web Front-end > JS Tutorial > javascript Get the playback address and lyrics content based on the song title_javascript skills

javascript Get the playback address and lyrics content based on the song title_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 18:52:01
Original
1862 people have browsed it

Let me tell you, when you listen to music online, you cannot do without them. Since the external jquery.js file is used, please refresh the page after running the code to take effect!


[Ctrl A select all Note:
If you need to introduce external Js, you need to refresh to execute ]<script> $(function(){ $("#surl").bind("click",function(){ $("#surl").attr("disabled",true); var song = encodeURI($("#kw").val()); song = encodeURI(song); var str = "<ul>"; $.getJSON("http://www.faqee.com/crm/song?act=songurl&song="+song+"&jsoncallback=?", function(json){ $.each(json,function(i,n){ n = n+""; i = i+""; if(i!="res"){ var ss = "<li>待选:<a href=\"#\">"+n+""; str=str+ss; }else{ if(n == "0"){ alert("抱歉,搜索不到歌曲!"); $("#surl").attr("disabled",false); return; } } }); str = str+""; $("#searchsesult").html(str); $("#surl").attr("disabled",false); }); }); $("#slrc").bind("click",function(){ $("#slrc").attr("disabled",true); var song = encodeURI($("#kw").val()); song = encodeURI(song); var str = ""; $.getJSON("http://www.faqee.com/crm/song?act=songlrc&song="+song+"&jsoncallback=?", function(json){ $.each(json,function(i,n){ n = n+""; i = i+""; if(i!="res"){ $("#searchsesult").html(n); $("#slrc").attr("disabled",false); return; }else{ if(n == "0"){ alert("抱歉,搜索不到歌词!"); $("#slrc").attr("disabled",false); return; } } }); }); }); }); </script>
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Apakah pengumpulan sampah JavaScript?
From 1970-01-01 08:00:00
0
0
0
Apakah fungsi cangkuk JavaScript?
From 1970-01-01 08:00:00
0
0
0
JavaScript 후크 기능이란 무엇입니까?
From 1970-01-01 08:00:00
0
0
0
Was sind JavaScript-Hook-Funktionen?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template