简体   繁体   English

html表单元素

[英]html form elements

i add elements like this. 我添加这样的元素。 i want this element to appear inside a div ..how do i do it..? 我希望这个元素出现在div内..我该怎么做..?

$form->addElement('text','first_name','First Name:'); 

i'll just shoot into the dark and assume the following: 我只是朝天开枪,并假设以下几点:

$form->addElement() will return some sort of class object representing an html element. $form->addElement()将返回某种表示html元素的类对象。 therefor, create a div element, save it to a variable and add the text element (whatever that may be … <input type="text" /> ?) to it. 为此,创建一个div元素,将其保存到变量中,然后向其添加text元素(可能是… <input type="text" />吗?)。

$div = $form->addElement('div');
$div->addElement('text','first_name','First Name:');

remember: i do not know what framework you are using, i'm just guessing here to give you some starting point 记住:我不知道您使用的是什么框架,我只是想在这里给您一些起点

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM