一、替换背景图片:
<!-- Cover Background --> <div class="cover-bg pos-abs full-size bg-img" data-image-src="img/bg-slide3.jpg"></div> <!-- BEGIN OF Slideshow Background --> <div class="cover-bg pos-abs full-size slide-show"> <i class='img' data-src='./img/bg-slide3.jpg'></i> <i class='img' data-src='./img/bg-slide2.jpg'></i> <i class='img' data-src='./img/bg-slide1.jpg'></i> </div> <!-- END OF Slideshow Background -->
二、替换时间(倒计时截止时间)
<div class="site-config" data-date="1/15/2018 14:00:00" data-date-timezone="+8"></div>
三、替换背景音乐:
使用插件:jplayer详细使用方法及参数可以参照官网说明进行修改定制。
<script type="text/javascript"> $(document).ready(function(){ $("#jquery_jplayer_1").jPlayer({ ready: function () { $(this).jPlayer("setMedia", { mp3: "music.mp3",//背景音乐路径 }).jPlayer("play"); }, ended: function() { // The $.jPlayer.event.ended event $(this).jPlayer("play"); // Repeat the media //重复播放 }, swfPath: "/js", supplied: "mp3" //音乐类型 }); }); </script>
四、表单处理:
模板中涉及两个表单:
1.提交宾客姓名:
<form id="mail-subscription" class="form magic send_email_form" method="get" action="ajaxserver/serverfile.php">
处理脚本为serverfile.php
处理代码段为:
if (isset($_GET['submit_email'])) { ...... file_put_contents("email.txt", $email . " \r\n", FILE_APPEND | LOCK_EX); ......
处理结果为将页面传递字符保存为同目录下email.txt
2.处理留言;
<form class="message form send_message_form" method="get" action="ajaxserver/serverfile.php">
处理脚本为serverfile.php
else if (isset($_GET['submit_message'])) { $email = trim($_GET['email']); $name = trim($_GET['name']); $message = trim($_GET['message']); $email = filter_var(@$_GET['email'], FILTER_SANITIZE_EMAIL ); $name = htmlentities($name); $message = htmlentities($message); if (!isset($response['error']) || $response['error'] === '') { $content = "Name: " . $name . " \r\nEmail: " . $email . " \r\nMessage: " . $message; $content = str_replace(array('<','>'),array('<','>'),$content); $name = str_replace(array('<','>'),array('<','>'),$name); $message = str_replace(array('<','>'),array('<','>'),$message); file_put_contents("message.txt", $content . "\r\n---------\r\n", FILE_APPEND | LOCK_EX); ......
处理结果:保存页面传递表单并保存为同目录下message.txt
如果您也正想用作婚庆典礼邀请,那么提前祝贺您婚姻美满,生活幸福!
BY-avenjan 2016/12/24
我最后还是挣扎了一下下载了,哈哈,的确挺不错,正好我朋友要结婚,他们用的第三方的做的,显得没专属性,我给她们做一个送他们,哈哈