在PHP Codeigniter中向form_submit添加一个类 [英] adding a class to form_submit in PHP Codeigniter
本文介绍了在PHP Codeigniter中向form_submit添加一个类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在PHP Codeigniter中向form_submit添加一个类;我正在使用以下代码:
I'm trying to add a class to form_submit in PHP Codeigniter; Im doing with the following code:
$attributes1=array(
'class'=>'btn btn-danger',
);
echo form_submit('loginSubmit', 'Login',$attributes1['class']);
但是HTML中呈现的代码如下:
But the rendered code in HTML is as following:
<input type="submit" name="loginSubmit" value="Login" btn="" btn-danger="">
您能不能让我知道谁可以将课程提交给我的表单?
could you please let me know who I can the class to my form_submit?
如果不清楚,请让我知道哪个部分含糊不清,这样我将提供更多的说明
Also If it is not clear please let me know which part is ambiguous so I will provide more clarification
非常感谢
推荐答案
使用像这样
echo form_submit('loginSubmit', 'Login',"class='btn btn-danger'");
这篇关于在PHP Codeigniter中向form_submit添加一个类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文