Answer checking script I got this basic script which I'll be using to check if the answer is right. The only problem is that I'll be using with many forms. That's why I need this code to be more like DRY code.

            function checkAnswer()
        {
            var answer = document.getElementById("answer").value;
            if (answer.toLowerCase() == "correct answer")
            {
                alert("Well done!");
            }
            else
            {
                alert("Too bad!");
            }

            var answer2 = document.getElementById("answer2").value;
                     if (answer2.toLowerCase() == "correct answer")
            {
                alert("Well done!");
            }
            else
            {
                alert("Too bad!");
            }

            var answer3 = document.getElementById("answer3").value;
            if (answer3.toLowerCase() == "correct answer")
            {
                alert("Well done!");
            }
            else
            {
                alert("Too bad!");
            }
        }
Checking against a string like this is error prone. What happens if you accidently misspell "correct" one of the times? You're better off using a number constant as an enum to signify success/failure (After rereading your post, I realized I may have misinterpreted your intent).
I'd just extract that repeated bit into a function:

function answerIsCorrect(answer, correctAnswer) {
    return answer.toLowerCase() === correctAnswer;
}


Then, since you're also repeating the use of this code, you might as well use a loop to prevent duplication:

function checkAnswers(correctAnswers) {

    //You could also just use a standard for-loop for this
    correctAnswers.forEach(function(correctAnswer, i) {
        //Note unless you check prevent i from being appended when i == 1,
        // your first answer ID will be "answer1" instead of "answer"
        var answer = document.getElementById("answer" + (i + 1)).value;

        if (answerIsCorrect(answer, correctAnswer)) {
            alert("Well done!");

        } else {
            alert("Too bad!");
        }
    });
}


correctAnswers could also be a list of numbers, representing each answer's position in the list of answers. This would mean you would only need to check the index of the answer, instead of the value of the answer, which would make manipulations like toLowerCase unneccessary.
Your indentation is a little off at the top, but that could be a pasting error.