2014-04-20 33 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>"; 
     } 
    } 
相关问题