1、引入layer.js或者layui.js,引入
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
2、js代码
<script src="/static/layui/layer.js"></script>
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$("#btn-search").click( function () {
var loadingFlag;
var domainName = $('#domainName').val();
var courseyear = $('#courseyear').val();
var title = $('#vtitle').val();
if (domainName == "") {
layer.msg('请选择七牛空间!', {icon: 2, shade: 0.3, offset: '40%', time: 2000});
return;
}
if (courseyear == "") {