大神 求助啊
叶落挽枫 2015-07-16 07:37:33 Uncaught InvalidStateError: Failed to read the 'selectionStart' property from 'HTMLInputElement': The input element's type ('hidden') does not support selection.
我提交ajax时 给我 报了 这个错误
//获得值
topicName = $("#quesContent").val();
analyseWord = $("#newsContents").val();
difficulty = $("input[name='ndsd']:checked").val();
tikuCategoryId = $("#categoryId").val();
tikuSubjectId = $("#subId").val();
chapterId = $("#chapter").val();
sectionId = $("#section").val();
pointId = $("#exampoint").val();
if(types == "TOPIC_TYPE_RADIO"){
//单选
var options = [];
topicId = $("#topicId").val();
for(var i = 0 ; i < $(".quesOption").length ; i ++){
optionId = $(".quesOption:eq("+i+")").find("input[name='answer']").attr("data-id");
optionNo = $(".quesOption:eq("+i+")").find("input[name='answer']").val();
optionName = $(".quesOption:eq("+i+")").find("input:first").val();
correctFlag = ($(".quesOption:eq("+i+")").find("input[name='answer']").attr("checked") == 'checked' ? 1 : 0);
var option = {"id":optionId,"optionNo":optionNo,"optionName":optionName,"correctFlag":correctFlag};
options.push(option);
}
var paramOptions = JSON.stringify(options);
var topic = {"id":topicId,"topicName":topicName,"topicType":types,"difficulty":difficulty,"analyseWord":analyseWord,"tikuSubjectId":tikuSubjectId,"tikuCategoryId":tikuCategoryId};
var paramTopic = JSON.stringify(topic);
var point = {"chapterId":chapterId,"sectionId":sectionId,"pointId":pointId};
var paramPoint = JSON.stringify(point);
$.ajax({
url: rootPath + "/question/radioEdit",
type:"post",
data:{"topic":paramTopic,"point":paramPoint,"options":paramOptions,"method":method,"btn":btn},
dataType:"json",
beforeSend:function(XMLHttpRequest){
$(".loading").show();
$(".loading-bg").show();
},