color=darkred]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>New Web Project</title>
<script type="text/javascript" src="jquery-1.2.6.min.js">
</script>
<script type="text/javascript" src="jquery-impromptu.3.1.min.js">
</script>
<style type="text/css">
* { margin:0; padding:0;}
p{font-size:12px;}
#wrapper{ margin-left:auto; margin-right:auto; text-align:center; margin-top:100px;}
/*-------------impromptu的样式,可以进行修改---------- */
.jqifade{ position: absolute; background-color: #aaaaaa; }
div.jqi{ width: 400px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; position: absolute; background-color: #ffffff; font-size: 11px; text-align: left; border: solid 1px #eeeeee; -moz-border-radius: 10px; -webkit-border-radius: 10px; padding: 7px; }
div.jqi .jqicontainer{ font-weight: bold; }
div.jqi .jqiclose{ position: absolute; top: 4px; right: -2px; width: 18px; cursor: default; color: #bbbbbb; font-weight: bold; }
div.jqi .jqimessage{ padding: 10px; line-height: 20px; color: #444444; }
div.jqi .jqibuttons{ text-align: right; padding: 5px 0 5px 0; border: solid 1px #eeeeee; background-color: #f4f4f4; }
div.jqi button{ padding: 3px 10px; margin: 0 10px; background-color: #2F6073; border: solid 1px #f4f4f4; color: #ffffff; font-weight: bold; font-size: 12px; }
div.jqi button:hover{ background-color: #728A8C; }
div.jqi button.jqidefaultbutton{ background-color: #BF5E26; }
.jqiwarning .jqi .jqibuttons{ background-color: #BF5E26; }
/*-------------------------------- */
</style>
<script type="text/javascript">
$(document).ready(function(){
$("#sub").click(function(){
//这里对应的是ads文件夹里面的图片,名称为:avatar.jpg、hg.jpg
var city = "ads/"+$("#city").val()+".jpg";
if($("#city").val()!=null && $("#city").val()!=""){
var txt = '<img width="300" src="'+ city +'"/> <br><p>是否确认选择!</p>';
//这里可以进行各种确认效果的修改
$.prompt(txt,{
buttons:{'确定':true, '取消':false},
callback: function(v,m,f){
if(v){
$("form:first").submit();
}
}
});
}else{
$.prompt('请选择一个值');
}
});
});
</script>
</head>
<body>
<div id="wrapper">
<form action="" method="post">
<select id="city" >
<option value="">请选择</option>
<option value="avatar">1</option>
<option value="hg">2</option>
</select>
<br />
<br />
<input value="确定" type="button" id="sub"/>
<input name="" type="reset" value="取消" />
</form>
</div>
</body>
</html>
[/color]
分享到:
相关推荐
自定义弹出框样式 alert修改 根据需要修改弹出框样式
自定义 js alert 弹出框
有时候感觉系统自带的提示框太丑了,试试自定义提示框吧,直接引用js即可
弹出框,能有效解决alert不能自定义问题,适配ios7,能有效解决textfield被键盘挡住的问题。
自定义alertView弹出框
闭包自定义alert 弹出框
通过html + css +jquery写的一个自定义弹出层,希望对大家有用。
用闭包的技术实现alert 弹出框效果,样式可以自己添加调整,使弹出框更加有弹性。更多变灵活
自定alert弹出框,自己可以做相应的修改、美化
js 精美弹出框 alert 可以设置样式,取代传统丑陋的alert弹出框
可以自己定义遮罩层的样式和Alert弹出框的样式
alert和confirm弹出框样式美化,可自定义颜色和样式,无须调用浏览器自带弹框。
NULL 博文链接:https://michealbean.iteye.com/blog/2195659
alert和confirm弹出框样式美化,可自定义颜色和样式,无须调用浏览器自带弹框。
Winform自定义消息框,好看的消息提示Alert源码,国外大神,很基础的实现,可以在此基础上进行优化和进一步调整。Winform控件、Winform优美提示框、消息框、Alert信息弹窗、Notification
-- 弹出框 --> <link rel="stylesheet" href="__PUBLIC__/css/sweetalert.css"> <!-- 弹出框 --> <script type="text/javascript" src="__PUBLIC__/wxparent/js/sweetalert-dev.js"> swal({ title: "", text: res...
alert及confirm弹出框样式,换不错