::: در حال بارگیری لطفا صبر کنید :::Loading , please wait ...

انجمن کدستانMoisrex

MoisrexMoisrex.rozblog.com
زمان جاریtime : سه شنبه 10 آذر 1405 - 3:16 بعد از ظهر
نام کاربریusername : پسوردpassword : یاor عضویتregister | رمز عبور را فراموش کردمForgot your password?
شما در سایت ما ثبت نام نکرده اید و یا وارد اکانت کاربری خود نشده اید. از شما خواهشمند هستیم You are not log in to site. Please وارد شویدlogin یاor ثبت نام کنیدregister .
amirmohsen آفلاین




ارسال‌هاAsnwers : 3175
عضویتRegistration date : 20 /11 /1391
حمایت کردهthanks : 610
حمایت شدهThanked : 1228
پاسخAnswer 14 : ایجاد فرم امتحان اینترنتی به همراه کارنامه

این کدو بزار رو صفحه quiz:

کد:

<Doctype>

<HTML>

<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<H1><Title>فرم امتحان</Title></H1>

<link rel="stylesheet" href="http://sistemfa.ir/temp/fonts/style.css" media="all" />

<link rel="stylesheet" href="http://up.sistemfa.ir/up/sistemfa/quiz/css.css" media="all" />

<script>

// Start Quiz Code!

// Programmed By: AmirMohsen | Copyright 2014-2015 SistemFa | Don't Copy!

// http://sistemfa.ir/

var totalquestions=2

var correctchoices=new Array()

correctchoices[1]='b'

correctchoices[2]='a'

function exam(){

var incorrect=null

for (q=1;q<=totalquestions;q++){

var thequestion=eval("document.myquiz.question"+q)

for (c=0;c<thequestion.length;c++){

if (thequestion[c].checked==true)

actualchoices[q]=thequestion[c].value

}

if (actualchoices[q]!=correctchoices[q]){

if (incorrect==null)

incorrect=q

else

incorrect+="/"+q

}

}

if (incorrect==null)

incorrect="a/b"

document.cookie='q='+incorrect

if (document.cookie=='')

alert("کوکی های شما اجازه استفاده از این سرویس را نمی دهند")

else

window.location="http://codix.ir/page/answer"

}

function showsolution(){

var win2=window.open("","win2","width=200,height=350, scrollbars")

win2.focus()

win2.document.open()

for (i=1;i<=totalquestions;i++){

for (temp=0;temp<incorrect.length;temp++){

if (i==incorrect[temp])

wrong=1

}

if (wrong==1){

win2.document.write("سوال "+i+"="+correctchoices.fontcolor("red")+"<br />")

wrong=0

}

else

win2.document.write("سوال "+i+"="+correctchoices+"<br />")

}

win2.document.close()

}

// http://sistemfa.ir/

</script>

<script>

var actualchoices=new Array()

document.cookie="ready=yes"

</script>

</head>

<body bgcolor="#FFF" name="sistemfa" ”) used on a non-void HTML element. Ignoring the slash and treating as a start tag." class="error">/>

<div align="center">

<div class="title"><input type="button" value="توضیحات عنوان" name="darsbaz" style="cursor:none;" /> عنوان امتحان

<input type="button" value="عنوان سایت شما" name="Link" onClick="window.open('آدرس سایت شما');" /></div>

<div class="main">

<form method="POST" name="myquiz">

<!-- Question -->

<div class="questions">موضوع سیستم فا درباره چیست؟

<div class="arrow"></div></div>

<input type="radio" value="a" name="question1" class="answer" />دانلود

<input type="radio" value="b" name="question1" class="answer" />گرافیک و کدنویسی

<input type="radio" value="c" name="question1" class="answer" />گزینه 1و3

<input type="radio" value="d" name="question1" class="answer" />سرگرمی

<div class="hr"></div>

<!-- /Question -->

<!-- Question -->

<div class="questions">سیستم فا به انگلیسی؟

<div class="arrow"></div></div>

<input type="radio" value="a" name="question2" class="answer" />sistemfa

<input type="radio" value="b" name="question2" class="answer" />seistemfa

<input type="radio" value="c" name="question2" class="answer" />systemfa

<input type="radio" value="d" name="question2" class="answer" />servisfa

<div class="hr"></div>

<!-- /Question -->

</form>

<form>

<input type="button" value="دریافت کارنامه" name="B1" onClick="exam()" />

<input type="button" value="امتحان دوباره" name="B2" onClick="document.myquiz.reset()">

</form>

</div>

طراح:

All Right Reserved. CopyRight By: http://sistemfa.ir *

</div>

</bodظy>

</html>

این کدو بزار رو صفحه answer:

کد:

<Doctype>

<Html>

<head>

<Meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<H1><Title>کارنامه شما</Title></H1>

<script>

var totalquestions=2

var correctchoices=new Array()

correctchoices[1]='b'

correctchoices[2]='a'

function gradeit(){

var incorrect=null

for (q=1;q<=totalquestions;q++){

var thequestion=eval("document.myquiz.question"+q)

for (c=0;c<thequestion.length;c++){

if (thequestion[c].checked==true)

actualchoices[q]=thequestion[c].value

}

if (actualchoices[q]!=correctchoices[q]){

if (incorrect==null)

incorrect=q

else

incorrect+="/"+q

}

}

if (incorrect==null)

incorrect="a/b"

document.cookie='q='+incorrect

if (document.cookie=='')

alert("متاسفانه کوکی های شما اجازه استفاده از این سرویس را نمی دهند")

else

window.location="http://codix.ir/page/quiz"

}

function showsolution(){

var win2=window.open("","win2","width=200,height=350, scrollbars")

win2.focus()

win2.document.open()

win2.document.write('<title>مشاهده پاسخ ها</title>')

win2.document.write('<body bgcolor="#FFFFFF">')

win2.document.write('<center><h3>مشاهده پاسخ ها</h3></center>')

win2.document.write('<center>')

for (i=1;i<=totalquestions;i++){

for (temp=0;temp<incorrect.length;temp++){

if (i==incorrect[temp])

wrong=1

}

if (wrong==1){

win2.document.write("سوال: "+i+"="+correctchoices.fontcolor("red")+"<br />")

wrong=0

}

else

win2.document.write("سوال: "+i+"="+correctchoices+"<br />")

}

win2.document.write('</center></font>')

win2.document.write("<h5>پاسخ سوالات</h5>")

win2.document.close()

}

</script>

<link rel="stylesheet" href="http://sistemfa.ir/temp/fonts/style.css" media="all" />

<link rel="stylesheet" href="http://up.sistemfa.ir/up/sistemfa/quiz/css.css" media="all" />

</head>

<body bgcolor="#FFFFFF" name="scores" ”) used on a non-void HTML element. Ignoring the slash and treating as a start tag." class="error">/>

<div align="center">

<div class="main">

<table border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="100%"><form method="POST" name="result"><table border="0" width="100%" cellpadding="0" height="115">

<tr>

<td bgcolor="#D3FFA8"><strong>تعداد سوالات صحیح:</strong></td>

<td><p><input type="text" name="p" /></td>

</tr>

<tr>

<td bgcolor="#D3FFA8"><strong>تعداد سوالات غلط:</strong></td>

<td><p><input name="T2" wrap="virtual" /></td>

</tr>

<tr>

<td bgcolor="#D3FFA8"><strong>نمره نسبی شما:</strong></td>

<td><input type="text" name="q" /></td>

</tr>

</table>

</form>

</td>

</tr>

</table>

</center></div>

<form method="POST"><div align="center"><center><p>

<script>

var wrong=0

for (e=0;e<=2;e++)

document.result[e].value=""

var results=document.cookie.split(";")

for (n=0;n<=results.length-1;n++){

if (results[n].charAt(1)=='q')

parse=n

}

var incorrect=results[parse].split("=")

incorrect=incorrect[1].split("/")

if (incorrect[incorrect.length-1]=='b')

incorrect=""

document.result[0].value=totalquestions-incorrect.length+" out of "+totalquestions

document.result[2].value=(totalquestions-incorrect.length)/totalquestions*100+"%"

for (temp=0;temp<incorrect.length;temp++)

document.result[1].value+=incorrect[temp]+", "

</script>

<input type="button" value="امتحان دوباره" name="B1" onClick="history.go(-1)" />

<input type="button" value="پاسخ سوالات" name="B2" onClick="showsolution()" /></p>

</center>

طراح:

All Right Reserved. CopyRight By: http://sistemfa.ir *

</div>

</form>

</body>

</html>

:)
چهارشنبه 14 اسفند 1392 - 18:29
وب کاربرUser's blog ارسال پیامSend p.m. نقل قولReply سپاس گزارمThanks



moisrex
درباره ماAbout us لینک های ماOur links کلمات کلیدیKeywords
انجمن تخصصی کدستان ، ساخته شده توسط فردی با نام مستعار Moisrex می باشد.This forum designed by a person who called Moisrex.

ایمیلE-mail : Moisrex @ Gmail.com
کدستان,انجمن کدستان,کدنویسی,انجمن پشتیبانی,فروم,رزبلاگ,آموزش کدنویسی,درخواست کد
تمامی حقوق این انجمن مربوط به همین انجمن می باشد | طراحی قالبCopyright (c) By Moisrex , All rights reserved | Desiger : Moisrex