【发布时间】:2014-10-15 05:12:06
【问题描述】:
我有一个带有单个 CSS 文件(约 1500 行)的 java spring 项目。 我要求在项目的其中一个屏幕上添加一个对话框。 问题是对话框与项目风格(颜色、字体等)不匹配。
有没有什么简单的方法可以改变对话框的样式来匹配我的项目风格?
我的对话框:
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="irw" tagdir="/WEB-INF/tags" %>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script type="text/javascript">
$(document).ready(function(){
var dialog_t = '<div id="register_confirm">bla bla</div>';
//real code has checkboxs'
$( dialog_t ).dialog({
autoOpen: false,
width:1000,
height: 500,
modal: true,
open: function( event, ui ) {
$("#confirmation_failed").hide();
},
buttons: [{
text: "Continue to form",
click: function() {
var confirmed = verifyAllConfirmationCheckboxAreChecked();
if(confirmed == true){
$("#registerConfirmation").attr("value", "CONFIRMED");
$( this ).dialog( "close" );
$( "form" ).submit();
}else {
$("#confirmation_failed").show();
$("#registerConfirmation").attr("value", "");
}
}
}
});
$( ".register" ).click(function() {
$("#register_confirm").dialog( "open" );
});
});
提前致谢!
迈克
【问题讨论】:
-
你读过documentation吗?查看主题部分。
-
样式不匹配是什么意思?它是否使用其他 css 样式表不匹配?如果它使用相同的样式,它应该实际上匹配样式。
标签: java jquery css styles dialog