选择语言 :

 Core_Form::button

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 ] )
uses
HTML::attributes

参数列表

参数 类型 描述 默认值
$name string Input name
$body string Input value
$attributes array Html attributes null
返回值
  • string
File: ./core/classes/form.class.php
public static function button($name, $body, array $attributes = null)
{
    // Set the input name
    $attributes['name'] = $name;

    return '<button' . HTML::attributes($attributes) . '>' . $body . '</button>';
}