我想将这个亚马逊mp3小部件嵌入到页面中。
https://widgets.amazon.com/Amazon-MP3-Clips-Widget/
但事实是,页面动态加载歌曲,所以我想在生成页面时给小部件一个ASIN(亚马逊标准识别号码)列表。亚马逊给我复制/粘贴的代码(据我所知)并没有任何ASIN。 是否可以通过为其提供ASIN列表来加载小部件?
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_6211089e-a28e-4805-b63c-45fd4ca199d5" WIDTH="336px" HEIGHT="280px">
<PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Fwidgetsamazon-20%2F8014%2F6211089e-a28e-4805-b63c-45fd4ca199d5&Operation=GetDisplayTemplate">
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="bgcolor" VALUE="#FFFFFF">
<PARAM NAME="allowscriptaccess" VALUE="always">
<embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Fwidgetsamazon-20%2F8014%2F6211089e-a28e-4805-b63c-45fd4ca199d5&Operation=GetDisplayTemplate" id="Player_6211089e-a28e-4805-b63c-45fd4ca199d5" quality="high" bgcolor="#ffffff" name="Player_6211089e-a28e-4805-b63c-45fd4ca199d5" allowscriptaccess="always" type="application/x-shockwave-flash" align="middle" height="280px" width="336px">
</embed>
</OBJECT>
<NOSCRIPT>
<A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Fwidgetsamazon-20%2F8014%2F6211089e-a28e-4805-b63c-45fd4ca199d5&Operation=NoScript">
Amazon.com Widgets</A>
</NOSCRIPT>
答案 0 :(得分:1)
要回答我自己的问题,我找到了以下代码。它允许任意数量的约20个ASIN。
<script type="text/javascript"> var amzn_wdgt={widget:"MP3Clips"}; amzn_wdgt.tag=""; amzn_wdgt.title="my title"; amzn_wdgt.widgetType="ASINList"; amzn_wdgt.ASIN="B000XNXMG8,B001KPK6QC,B001KPK6QC,B002TU3JQQ" amzn_wdgt.width="250"; amzn_wdgt.height="250"; amzn_wdgt.shuffleTracks="True"; </script> <script type="text/javascript" src="http://wms.assoc-amazon.com/20070822/US/js/swfobject_1_5.js"> </script>
您也可以更改宽度和高度,但它仅适用于某些组合(336x280,120x300,160x300,125x125,120x90,234x60)。默认宽度和高度为250px×250px。