下面的函数定义紧随其后的是一个对其进行调用的输入字段,但该函数没有被视为已定义?!
<script>
<![CDATA[
function SubmitCross()
{
var axis1 = "select_flavor" + document.all.item('axisflavor1').selectedIndex + "_axis1";
var axis2 = "select_flavor" + document.all.item('axisflavor2').selectedIndex + "_axis2";
var variable1 = document.all.item(axis1).value.split(".");
if (variable1[0].indexOf("error") == -1)
{
var questionY = variable1[0].split("-");
var implicitTypeY = variable1[1].split("-");
var flavorY = variable1[2].split("-");
document.all.item('question_y').value = questionY[1];
document.all.item('implicit_type_y').value = implicitTypeY[1];
document.all.item('flavor_y').value = flavorY[1];
document.all.item('choice_y').value = -1;
}
else
{
alert ("Please select a valid x-axis variable");
return;
}
var variable2 = document.all.item(axis2).value.split(".");
if (variable2[0].indexOf("error") == -1)
{
var questionX = variable2[0].split("-");
var implicitTypeX = variable2[1].split("-");
var flavorX = variable2[2].split("-");
document.all.item('question_x').value = questionX[1];
document.all.item('implicit_type_x').value = implicitTypeX[1];
document.all.item('flavor_x').value = flavorX[1];
document.all.item('choice_x').value = -1;
}
else
{
alert ("Please select a valid y-axis variable");
return;
}
]]> 下面的输入元素包含对上述函数的调用,就在它的正下方。IE 10 不想承认它是一个函数?!?!
<input class="popuButton" type="button" value="Go!" onclick="SubmitCross();"/>