How to copy and paste a code on my website?

Where can I learn how to write code that will allow people to copy a script from my website and paste it into their website to play audio files hosted on my website?

  • Answer:

    First you need something like Yahoo Media Player which can detect links to MP3 files and convert them into embedded audio players. This is very easy to drop in to any site. http://mediaplayer.yahoo.com/ Note the examples there, then create hyperlink HTML code with absolute URLs to your audio files Then you need to display the code the end-user needs to copy-paste into their website, on your website. Look at the Yahoo Media Player page above as a good example. Basically you can indicate code by encoding the html characters < and > and surrounding it with <pre> tags, like this: <pre style="border: 1px solid #ccc; padding: 5px;\"> &lt;script type="text/javascript" src="http://mediaplayer.yahoo.com/js"&gt;&lt;/script&gt; &lt;a href="http://link-to-your-mp3"&gt;Name of your Audio File&lt;/a&gt; </pre> Drop the above code onto your site, and it will display a box with code in it on your site that looks like this: <script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script> <a href="http://link-to-your-mp3">Name of your Audio File</a>

Scott Becker at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.