2014-04-20 58 views

回答

0

您可以使用fancybox打開彈出窗口並在彈出窗口中顯示您的計算結果。

見下文here

見示例代碼的fancybox彈出的演示:

<a class="fancybox" href="#inline1" title="My Calculations"><input type="button" value="Mybtn"></a> 

<div id="inline1" style="width:400px;display: none;"> 
// your calculations here 
</div> 
0

感謝朋友們的回答和建議 我解決了這個問題,並在每個崗位增加了一個我自己的按鈕。以下是代碼。

add_action('the_content','customFields'); 
function customFields($text) 
    { 
     global $post; 
     if($post->post_type=='post') 
     { 
      return $text."<div style='width:100%;text-align:center'><a href=javascript:(function(){var%20url='".$URL;window.open(url,'Yahoo','width=600,height=500');})();><image src='".$imgURL."'/></a></div>"; 
     } 
    } 
相關問題