以下函数定义后面紧跟一个带有调用的输入字段,但该函数看不到定义?!
<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;
}
]]&GT; 以下input元素包含对上面函数的调用,就在它下面。 IE 10不想承认它是一个功能?!?!
<input class="popuButton" type="button" value="Go!" onclick="SubmitCross();"/>    
答案 0 :(得分:0)
我不知道“&lt;![CDATA [”对你有什么用。但我的赌注是你的功能有定义错误。尝试调试你的JavaScript。好像你错过了收盘'{'括号?