一、替换背景图片:
1 2 3 4 5 6 7 8 9 10 11 | <!-- 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 --> |
二、替换时间(倒计时截止时间)
1 | < div class = "site-config" data-date = "1/15/2018 14:00:00" data-date-timezone = "+8" ></ div > |
三、替换背景音乐:
使用插件:jplayer详细使用方法及参数可以参照官网说明进行修改定制。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <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.提交宾客姓名:
1 | < form id = "mail-subscription" class = "form magic send_email_form" method = "get" action = "ajaxserver/serverfile.php" > |
处理脚本为serverfile.php
处理代码段为:
1 2 3 4 | if (isset($_GET[ 'submit_email' ])) { ...... file_put_contents( "email.txt" , $email . " \r\n" , FILE_APPEND | LOCK_EX); ...... |
处理结果为将页面传递字符保存为同目录下email.txt
2.处理留言;
1 | < form class = "message form send_message_form" method = "get" action = "ajaxserver/serverfile.php" > |
处理脚本为serverfile.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 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
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com