我有以下代码:
$this->Js->get('#get_meters_today')->event('click',
$this->Js->request(
array('action' => 'getMetersToday'),
array('async' => true, 'update' => '#meters_today')
)
);
$this->Html->scriptBlock(
$this->Js->domReady(
$this->Js->request(
array('action' => 'getMetersToday'),
array('async' => true, 'update' => '#meters_today')
)
), array('inline' => false)
);
我想要做的只是编写Js->request
一次,并由click
方法和domReady
方法引用。我该怎么做?
由于