Creates a button form input. Note that the body of a button is NOT escaped, to allow images and other HTML to be used.
echo Form::button('save', 'Save Profile', array('type' => 'submit'));
string Core_Form::button( string $name , string $body [, array $attributes = null ] )
参数列表
参数 类型 描述 默认值 $name
string
Input name $body
string
Input value $attributes
array
Html attributes null
string
public static function button($name, $body, array $attributes = null)
{
// Set the input name
$attributes['name'] = $name;
return '<button' . HTML::attributes($attributes) . '>' . $body . '</button>';
}