昨晚忙到凌晨3点都没解决的问题,大侠,今天晚能不熬夜不?HELP!
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了昨晚忙到凌晨3点都没解决的问题,大侠,今天晚能不熬夜不?HELP!,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含9452字,纯文字阅读大概需要14分钟。
内容图文
![昨晚忙到凌晨3点都没解决的问题,大侠,今天晚能不熬夜不?HELP!](/upload/InfoBanner/zyjiaocheng/208/e8b656a562d1476da1844dd2aaa6b896.jpg)
我的sina云地址:http://1.xyqcsmwly.sinaapp.com/quizphp/quiz.php
原创的演示地址:http://www.helloweba.com/demo/quiz/quiz.php
我的代码:
quiz.php
$row['id'].'、'.$row['question'], 'answers' => $answers );}$json = json_encode($arr);?>演示:如何使用jQuery+PHP+MySQL来实现一个在线测试项目 helloweba
如何使用jQuery+PHP+MySQL来实现一个在线测试项目
Powered by helloweba.com 允许转载、修改和使用本站的DEMO,但请注明出处:www.helloweba.com
connect.php
data.php
回复讨论(解决方案)
data.php
quizs.js
(function($) { $.fn.jquizzy = function(settings) { var defaults = { questions: null, startImg: 'images/start.gif', endText: '已结束!', shortURL: null, sendResultsURL: null, resultComments: { perfect: '你是爱因斯坦么?', excellent: '非常优秀!', good: '很好,发挥不错!', average: '一般般了。', bad: '太可怜了!', poor: '好可怕啊!', worst: '悲痛欲绝!' } }; var config = $.extend(defaults, settings); if (config.questions === null) { $(this).html('Failed to parse questions.
'); return; } var superContainer = $(this), answers = [], introFob = ' 请认真完成测试题。准备好了吗?', exitFob = '' + config.endText + '请选择一个选项!', contentFob = '', questionsIteratorIndex, answersIteratorIndex; superContainer.addClass('main-quiz-holder'); for (questionsIteratorIndex = 0; questionsIteratorIndex < config.questions.length; questionsIteratorIndex++) { contentFob += '' + (questionsIteratorIndex + 1) + '/' + config.questions.length + '' + config.questions[questionsIteratorIndex].question + '
- '; for (answersIteratorIndex = 0; answersIteratorIndex < config.questions[questionsIteratorIndex].answers.length; answersIteratorIndex++) { contentFob += '
- ' + config.questions[questionsIteratorIndex].answers[answersIteratorIndex] + ' '; } contentFob += '
' + judgeSkills(json.score) + '
您的分数: ' + json.score + '
' + resultSet + ''; superContainer.find('.result-keeper').html(resultSet).show(500); } }); } //superContainer.find('.resultsview-qhover').hide(); $(this).parents('.slide-container').fadeOut(500, function() { $(this).next().fadeIn(500); }); return false; }); };})(jQuery); 文件目录:
原创在线答题源码地址:http://www.helloweba.com/downsoft/297/
大侠们,帮忙看看,谢谢!
quiz.sql
-- phpMyAdmin SQL Dump-- version 3.2.0.1-- http://www.phpmyadmin.net---- 主机: localhost-- 生成日期: 2015 年 04 月 04 日 13:49-- 服务器版本: 5.5.8-- PHP 版本: 5.3.3SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;/*!40101 SET NAMES utf8 */;---- 数据库: `lrfbeyond_demo`---- ------------------------------------------------------------ 表的结构 `quiz`--CREATE TABLE IF NOT EXISTS `quiz` ( `id` int(11) NOT NULL AUTO_INCREMENT, `question` varchar(100) NOT NULL, `answer` varchar(500) NOT NULL, `correct` tinyint(2) NOT NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;---- 转存表中的数据 `quiz`--INSERT INTO `quiz` (`id`, `question`, `answer`, `correct`) VALUES(1, '罗马帝国曾一度辉煌,令人神往,故有“条条大陆通罗马”一说。那么,今天你是怎样理解这一谚语的准确含义的?', 'A.入乡随俗 ###B.四通八达 ###C.殊途同归 ###D.流连忘返', 3),(2, '找出不同类的一项:', 'A.斑马 ###B.军马 ###C.赛马 ###D.骏马 ###E.驸马', 5),(3, ' 蜡烛在空气中燃烧,蜡烛质量逐渐变小。这说明', 'A.物质可以自生自灭###B.发生的不是化学变化###C.不遵守质量守恒定律###D.生成物为气体,散发到空气中了', 4),(4, '以下哪位歌手没有获得过《我是歌手》总冠军?', 'A.羽泉###B.韩磊###C.邓紫棋###D.韩红', 3),(5, '下列哪个标签不是HTML5中的新标签?', 'A.<article>###B.<canvas>###C.<section>###D.<sub>', 4);
感谢版主大人xuzuning的回复,补齐4个文件,仍不能统计出结果。
补齐4个文件后的测试连接:http://2.xyqcsmwly.sinaapp.com/quiz.php
Warning: Cannot modify header information - headers already sent by (output started at /data1/www/htdocs/795/xyqcsmwly/2/quiz.php:1) in connect.php on line 12
你自己 F12
感谢,xuzuning,程序已正常运行。估计和SINA云身份认证有关,谢谢!
内容总结
以上是互联网集市为您收集整理的昨晚忙到凌晨3点都没解决的问题,大侠,今天晚能不熬夜不?HELP!全部内容,希望文章能够帮你解决昨晚忙到凌晨3点都没解决的问题,大侠,今天晚能不熬夜不?HELP!所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。