这是我在 jsfiddle 中的代码:http: //jsfiddle.net/MppxX/
如果您通过单击第一个“是”或 DIV 标记左侧的第一个图像来找到自己的方式,您将遇到我正在谈论的表单。
现在,在用户输入信息后(稍后我将包含一个“提交”按钮),我如何“保存”该信息?我需要这些信息有两个目的:
1)使用所述信息创建提醒
2)将为“提醒列表”创建一个单独的区域,并将显示那些保存的提醒
谢谢
$(document).ready(function() {
$(".appIMG1").click(function() {
$("#app1").animate({
left: '250px',
opacity: 0
});
$("#app2").fadeIn("slow");
});
});
$(document).ready(function() {
$(".appIMG2").one('click.appIMG2', function() {
$('.appIMG1, .appIMG2').unbind('click');
$('#app1').animate({
top: "0px",
opacity: 0
});
$("#app3").fadeIn("slow");
});
});
#app1{
position:absolute;
width:250px;
height:250px;
z-index:1;
top:50%;
left:50%;
margin:-150px 0 0 -150px;
background:white;
box-shadow: 0 0 1px 1px #888888;
text-align:center
}
#app2{
position:absolute;
width:300px;
height:300px;
z-index:0;
top:50%;
left:50%;
margin:-150px 0 0 -150px;
background:white;
box-shadow: 0 0 1px 1px #888888;
text-align:center;
}
#app3{
position:absolute;
width:300px;
height:250px;
z-index:8;
top:50%;
left:50%;
margin:-150px 0 0 -150px;
background:white;
box-shadow: 0 0 1px 1px #888888;
text-align:center;
}
img.appIMG1{
-webkit-box-shadow: 0 0 1px 1px #888888;
box-shadow:0 0 1px 1px #888888;
}
img.appIMG2{
-webkit-box-shadow: 0 0 1px 1px #888888;
box-shadow:0 0 1px 1px #888888;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<div id="app1">
<p><b><u><font face="TimeBurner" color="#66d9ff" size="6">Do you want to make a reminder?</b></u></font></p>
<br>
<img class="appIMG1" border="0" src="YES.png" align="left" hspace=1.8%>
<img class="appIMG2" border="0" src="NO.png" align="right" hspace=2%>
</div>
<div id="app2" style="display:none">
<form>
Name for the reminder: <input type="text" name="firstname"><br>
On what days would you like to be reminded on: <br>
<input type="checkbox" name="day" value="Monday">Monday<br>
<input type="checkbox" name="day" value="Tuesday">Tuesday<br>
<input type="checkbox" name="day" value="Wednesday">Wednesday<br>
<input type="checkbox" name="day" value="Thursday">Thursday<br>
<input type="checkbox" name="day" value="Friday">Friday<br>
<input type="checkbox" name="day" value="Saturday">Saturday<br>
<input type="checkbox" name="day" value="Sunday">Sunday<br>
</form>
</div>
<div id="app3" style="display:none">
<p><b><u><font face="TimeBurner" color="66d9ff" size="6">Do you want to check your current reminders?</b></u></font></p>
<img class="appIMG1" alt="YES" border="0" src="YES.png" align="left" hspace=1.8%>
<img class="appIMG2" alt="NO" border="0" src="NO.png" align="right" hspace=2%>
</div>