setExtraHtml("额外代码")
版本 | 新增功能 |
---|---|
1.0.5 | 新增四个额外html代码标记,content_top,content_bottom,form_top,form_bottom |
比如在页面添加一段代码。
$html = <<<EOF
<p>这是一个段落</p>
EOF;
return ZBuilder::make("form")
->addText("title", "标题")
->addTextarea("summary", "摘要")
->addUeditor("content", "内容")
->addImage("pic", "封面")
->setExtraHtml($html)
->fetch();
一般用于在页面添加一段隐藏的html代码,然后通过js控制其显示和隐藏。
1.0.5版本开始,新增四个额外html代码标记,content_top,content_bottom,form_top,form_bottom,位置如下
用法如下:
$html = "<p>这是一个段落</p>";
return ZBuilder::make("form")
->setExtraHtml($html, "content_top")
->fetch();