The Chtml::imagebutton method can do a button with a picture, but the submitted method is not a post,
It's also possible to get, never tried get.
In view, write this:
if (Isset ($_get[' id '))
{
Echo Chtml::imagebutton (Yii::app ()->baseurl. ' /images/button1.png ', Array (' Submit ' = ' action1?id= '. $_get[' id ')); With the parameter
Echo Chtml::imagebutton (Yii::app ()->baseurl. ' /images/button2.png ', Array (' Submit ' = ' controller2/action2 ')); With no parameters.
}
?>
This can be submitted.
But inside the controller's action,
Can't get post www.2cto.com
if (Isset ($_post[' POST '))
{
Never COME here
}
Author: georgelife7
http://www.bkjia.com/PHPjc/478091.html www.bkjia.com true http://www.bkjia.com/PHPjc/478091.html techarticle the Chtml::imagebutton method can use a picture to do a button, but the method of submission is not post, it may be get, never tried get. Write this in view: PHP if (isset ($_get[id])) {...