-4

I have a simple form written in Zend Framework:

class Application_Form_MyForm extends Zend_Form
{
    public function init()
    {
        $button = new Zend_Form_Element_Button('button');
        $button->setAttrib("onlick", "alert('hello!');");
        $this->addElement($button);
    }
}

If I'm clicking on this button, why am I not getting the statement from alert? What am I doing wrong?

4

1 回答 1

1

你打错了:onlick->onclick

于 2013-04-19T15:52:21.487 回答