style 常用语法
/*设置表格文字左右和上下居中对齐*/
td {
vertical-align: middle;
text-align: center;
}
/*设置文字超出后显示为省略号*/
div{
overflow: hidden;/*内容超出后隐藏*/
text-overflow: ellipsis;/* 超出内容显示为省略号*/
white-space: nowrap;/*文本不进行换行*/
}
jquery 常用语法
// 隐藏
$("#s2_br").hide();
// 显示
$("#s2_br").show();
// 添加属性
$("#select2").attr("disabled","disabled").css("background-color","#EEEEEE;");
// 设置值
$("#select2").val(manage.p_parent);
// 移除属性
$("#select1").removeAttr("disabled");
// 设置内容
$('#m_title').html("添加");
// 添加标签
var v1 = "<option value='-1'>暂无数据,请先创建项目</option>";
$("#select1").append(v1);
// 鼠标悬浮
$(".panel-heading").mouseover(function(){
$(this).css("background-color","#919CBF");
});
/// 鼠标移除
$(".panel-heading").mouseout(function(){
$(this).css("background-color","");
});
// 删除
function delet(id) {
var msg = "确定要删除吗?";
if (confirm(msg)==true){
var data = {"id":id};
// post请求
$.post("/delete_mode",data,function(manage){
// 弹出框
alert(manage);
// 浏览器console输出
console.info(manage);
// 刷新
window.location.reload();
});
}
}