在cakephp ajax链接中添加图像

War*_*ior 0 ajax cakephp

我使用cakephp ajax链接来调用页面

<div id="post"> </div> <?php echo $ajax->link( 'View Post', array( 'controller' => 'posts', 'action' => 'view', 1), array( 'update' => 'post', 'position' => 'top' ) ); ?> 我想显示图像而不是View Post.我已经使用$html->imge但它没有工作,谢谢你提前

che*_*987 5

<? echo $ajax->link($html->image('ragister-icon.png',array('title' => 'My Account','alt' => 'My Account','class' => 'lock-img')),array( 'controller' => 'posts', 'action' => 'view', 1),array( 'update' => 'post', 'position' => 'top' ,'escape'=>false));?>
Run Code Online (Sandbox Code Playgroud)