微件:PlantInfo:修订间差异

来自PlantsVsZombies Mixed
跳转到导航 跳转到搜索
无编辑摘要
无编辑摘要
第11行: 第11行:
   <tr>
   <tr>
     <td colspan="8" width="100%">
     <td colspan="8" width="100%">
<tabber>1技能=<img src="<!--{$pic|escape:'html'}-->"/>|-|2技能=<img src="<!--{$pic2|escape:'html'}-->"/></tabber></td>
      <div id="tabberContainer"></div>
    </td>
   </tr>
   </tr>
   <!--{/if}-->
   <!--{/if}-->
第27行: 第28行:
   </tr>
   </tr>
</table>
</table>
<!--{if $pic2}-->
<script type="text/javascript">
var pic1 = "<!--{$pic|escape:'javascript'}-->";
var pic2 = "<!--{$pic2|escape:'javascript'}-->";
$.ajax( {
    url: mw.util.wikiScript( 'api' ),
    data: {
        action: 'parse',
        text: '<tabber>1技能=<img src="' + pic1 + '"/>|-|2技能=<img src="' + pic2 + '"/></tabber>',
        contentmodel: 'wikitext',
        format: 'json'
    },
    dataType: 'json',
    type: 'POST',
    success: function( data ) {
        if ( data && data.parse && data.parse.text ) {
            var html = data.parse.text['*'];
            // Insert the HTML into the tabber container
            $( '#tabberContainer' ).html( html );
        }
    },
    error: function( xhr ) {
        // Handle errors
    }
} );
</script>
<!--{/if}-->
</includeonly>
</includeonly>

2024年2月14日 (三) 22:45的版本