1. 取消redio的选中状态:
而文件上传处理时的返回值是stream类型的(inputstream)。
var dutyType = $("input[name='dutyType']");
dutyType.attr("checked",false);
2. 添加属性
$("#dialog_duty_type1").prop("checked",true);
3. 设置option的选中状态(1)
function jsSelectIsExitItem(objSelect,objItemValue)
{
for(var i=0; i<objSelect.options.length;i++)
{
if(objSelect.options[i].value == objItemValue)
{
objSelect.options[i].selected = true;
break;
}
}
}
(2)$('#searchDutyId').find('option[value=***]').attr("selected",true);
4.使用JS实现文件上传时不能使用$().ajax(),因为该方法的返回值类型是xml,html,json,jsonp,text,script而文件上传处理时的返回值是stream类型的(inputstream)。