我真的很头疼……
我正在尝试向我的输入和 textarea 字段添加一个类,但是每当我这样做时:
$inputclass = $class." multilanginput";
第二部分没有附加,但是当我离开空间并这样做时:
$inputclass = $class."multilanginput";
它工作得很好......
我以前从未遇到过这个问题,任何想法出了什么问题?
这是这个小功能的一部分:
function backend_dynamic_dialoginput($label,$class,$type = 'single',$lang = "none"){
if($lang == "none"){
$lang = "";
}
else{
$lang = "_".$lang;
}
$class = $class.$lang;
$id = "";
if($type == "singleint" || $type == "multiint"){
$id = $class."_m";
$inputclass = $class." multilanginput";
}else{
$inputclass = $class;
}
$html = "
<div style='padding-left:10px;margin-top:1px;background-color:#dddddd;padding-bottom:8px;padding-top:8px;'>
<div style='float:left;font-size:13px;color:#5a5a5a;padding-top:6px;margin-bottom:2px;width:30%;text-align:right;padding-right:4px;' class='font_lato'>".$label."</div>
";
if($type == "single" || $type == "singleint"){
$html .= "<input type='text' value=".$inputclass." style='font-size:12px;width:60%;border:1px solid #ffffff;padding:2px;background-color:#dddddd;' class='font_din' id='".$id."' class='".$inputclass."'>";
}
else if($type == "multi" || $type == "multiint"){
$html .= "<textarea style='font-size:12px;width:60%;border:1px solid #ffffff;padding:2px;background-color:#dddddd;' class='font_din' id='".$id."' class='".$inputclass."' rows=2></textarea>";
}
$html .= "
";
if($type == "singleint" || $type == "multiint"){
$html .= "<div style='float:right;font-size:12px;background-color:#eeeeee;margin-right:4px;' id='".$class."' class='togglefullscr font_lato'>Int.</div>";
}
$html .= "
</div>";
if($type == "singleint" || $type == "multiint"){
$html .= backend_dynamic_internationaldialog($label,$class,$type);
}
return $html;
}