我想要做的就是转换与CakePHP的工作如下:如何在CakePHP中实现JavaScript onmouseover?
<a href="URL ADDRESS"><img src="URL OF THE FIRST IMAGE GOES HERE" onmouseover="this.src='URL OF THE SECOND IMAGE GOES HERE'" onmouseout="this.src='URL OF THE FIRST IMAGE GOES HERE'" /></a>
我见到目前为止以下内容:
<?php echo $this->Html->image("animalhealth.png", array(
"alt" => "Animal Health",
"onmouseover" => "this.src='animalhealthhover.png'",
"onmouseout" => "this.src='animalhealth.png'",
'url' => array('controller' => 'records', 'action' => 'index'
)
)); ?>
的问题是onmouseover
& onmouseout
事件行。我需要告诉蛋糕以某种方式使用辅助方法,否则它只会选择没有图像。我不想将整个地址作为导航菜单,并且在不同位置会有多个应用程序实例。
不是我所需要的,但感谢您的时间一样,谢谢。 – agit