Abhijeet Panpatil

Abhijeet Panpatil

  • NA
  • 95
  • 20.8k

storing json response in variable

Mar 25 2018 10:06 AM
  1. <!DOCTYPE html>  
  2. <html>  
  3. <head>  
  4. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>  
  5. <script>  
  6. $(document).ready(function(){  
  7. $(function () {  
  8. $("#btn").bind("click", function () {  
  9. var url = "http://104.211.243.204/?container=comedy-movies&blob=" + encodeURIComponent($("#itemList").val());  
  10. //window.location.href = url;  
  11. playVideo(url);  
  12. });  
  13. });  
  14. });  
  15. function playVideo(url){  
  16. $("#divVideo video source").attr('src',url);  
  17. $("#divVideo video")[0].load();  
  18. }  
  19. </script>  
  20. </head>  
  21. <body>  
  22. <!--your video control -->  
  23. <div id="divVideo">  
  24. <video width="320" height="240" controls>  
  25. <source type="video/mp4">  
  26. </video>  
  27. </div>  
  28. </body>  
  29. <script>  
  30. </script>  
  31. </html>  
i have tried this but didnot give me any output please help me regarding thsi.

Answers (4)