* add target param to linkButton() method.

This commit is contained in:
wangchunsheng
2013-01-18 08:28:03 +00:00
parent 730f64f4db
commit e04296deed
+3 -2
View File
@@ -451,12 +451,13 @@ EOT;
*
* @param string $label the link title
* @param string $link the link url
* @param string $target the target window
* @param string $misc other params
* @static
* @access public
* @return string
*/
public static function linkButton($label = '', $link = '', $misc = '')
public static function linkButton($label = '', $link = '', $target = 'self', $misc = '')
{
global $config;
@@ -467,7 +468,7 @@ EOT;
$link .= $onlybody;
}
return " <input type='button' value='$label' $misc onclick='location.href=\"$link\"' class='button-c' /> ";
return " <input type='button' value='$label' $misc onclick='{$target}.location=\"$link\"' class='button-c' /> ";
}
/**