我要在一个html页面里显示下面这段php代码的输出内容。怎么将下面这段代码以 javascript 的语法输出
<?php
define('WP_USE_THEMES', false);
require('article/wp-blog-header.php'); //修改博客的路径
query_posts('showposts=20'); //显示文章条数
?>
<?php while (have_posts()): the_post(); ?>
<li><a href="<?php the_permalink(); ?>" target="_blank"><?php echo mb_strimwidth(strip_tags(apply_filters('the_title', $post->post_title)), 0, 50," "); ?></a></li>
<?php endwhile; ?>