我正在尝试应用颜色:#000禁用文本框,其中文本显示为信息的一部分。 (问题:文本框中出现的文本默认为淡入淡出) 有什么建议??
答案 0 :(得分:0)
我认为问题是试图说:
public function index(){
$users = $this->data['tenant_users'] = $this->customer_user_m->tenant_users();
$domain = $users[0]['domain'];
$site = $users[0]['site_key'];
$tenant_id = $users[0]['tenant_id'];
$site = $this->session->userdata('site');
$user_table = $this->session->userdata('user_table');
function getOTAURLExt($ext){
var_dump($this);
}
function getOTAURLSite(){
echo "Site executed";
}
$this->db->select('*');
$this->db->where('id', $tenant_id);
$this->db->from('tenant');
$query = $this->db->get();
$result = $query->result_array();
if(empty($this->input->post('md'))){
$URL = getOTAURLSite($site);
}else{
$username = $result[0]['username'];
$table_user = $username . "_users";
$this->db->select('*');
$this->db->where($table_user . '.site_key', $site);
$this->db->join('mlcsites', 'mlcsites.site_key =' . $table_user . '.site_key');
$this->db->from($table_user);
$query_table = $this->db->get();
$information = $query_table->result_array();
$ext = $information[0]['ext'];
$count = count($information);
$found = false;
for($i = 0; $i < $count; $i++){
$domain = $information[$i]['domain'];
$ext = $information[$i]['ext'];
$hash = do_hash($ext . "@" . $domain, 'md5');
if($hash == $this->input->post('md')){
$found = true;
break;
}
}
if($found == true){
$URL = getOTAURLExt($ext);
}
}
if(empty($URL)){
}
$this->data['subview'] = 'provisioning/index';
$this->load->view('_layout_main', $this->data);
}
答案 1 :(得分:0)
您应该使用CSS属性选择器来获得更好的解决方案。看看这个例子 -
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Attribute Selector Example</title>
<style type="text/css">
input[disabled]{
color: #000;
border: 1px solid #000;
}
</style>
</head>
<body>
<form>
<input type="text" disabled="disabled" value="Disabled Input">
</form>
</body>
</html>
要了解属性选择器的工作原理,您可以查看此页面 - http://www.tutorialrepublic.com/css-tutorial/css-attribute-selectors.php
此外,如果您只想在IE中应用该样式,此页面将对您有所帮助 - http://www.tutorialrepublic.com/faq/how-to-define-style-sheet-only-for-internet-explorer.php