提供ID以提交按钮(Give ID to submit button)

编程入门 行业动态 更新时间:2024-10-26 09:27:45
提供ID以提交按钮(Give ID to submit button)

我有一个表格,我已经结束使用,

echo $this->Form->end('Login');

但是,我似乎无法为它指定一个id或类来设置它的样式,并且能够使用jquery引用它。 此外,我想用图片设置它的样式,图片已经有文字,所以我需要按钮值为空,但我无法管理...

任何帮助?

非常感谢,克里斯

***注意 - 这是它生成的html;

<div class="submit"><input type="submit" value="Login"/></div>

理想情况下,我想删除div,但它不是必需的。

I have a form and i have ended it using,

echo $this->Form->end('Login');

However, i can't seem to assign it an id or class to style it and be able to reference it with jquery. Also,I want to style it with a picture and the picture has the text already in so i need the buttons value to be empty but i can't manage that either...

Any Help?

Many Thanks, Chris

***Note - this is the html it generates;

<div class="submit"><input type="submit" value="Login"/></div>

Ideally i would like to remove the div aswell but its not a necessity.

最满意答案

这是解决方案:

$options = array ( 'label' => 'Update', 'value' => 'Update!', 'id' => 'blabla', 'div' => array( 'class' => 'glass-pill', ) ); echo $this->Form->end($options);

干杯! =)

here's the solution:

$options = array ( 'label' => 'Update', 'value' => 'Update!', 'id' => 'blabla', 'div' => array( 'class' => 'glass-pill', ) ); echo $this->Form->end($options);

Cheers! =)

更多推荐

无法,can't,class,value,电脑培训,计算机培训,IT培训"/> <meta name="des

本文发布于:2023-08-07 23:18:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1466448.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:按钮   ID   Give   button   submit

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!