//增加病例信息
function AddCaseInfoIllness()
{
//验证客户输入的合法性
if(!isDigit())
return;
var flag = false;
var patient_ID = '1';
var diagnoseType = '初诊';
if(document.getElementById('Radio7').checked)
{
diagnoseType = '复诊';
}
else if(document.getElementById('Radio8').checked)
{
diagnoseType = '急诊';
}
else
{
diagnoseType = '初诊';
}
var body_Tempertature = document.getElementById('txtTemperature').value.trim()!=''?document.getElementById('txtTemperature').value.trim():'37';
var is_Zymosis = 'false';
if(document.getElementById('Radio5').checked)
{
is_Zymosis = 'true';
}
var symptomCureCondition = document.getElementById('txtSymptom').value.trim();
var diagnoseDesc = document.getElementById('txtDiagnoseDesc').value.trim();
var clinic_ID = '2';
var chkIllnesList = document.getElementsByName("chkIllnessList");
var illnessId_Array='';
var m=0;
for(i=0;i<chkIllnesList.length;i++)
{
if(chkIllnesList[i].checked)
{
if(m==0)
{
illnessId_Array+= chkIllnesList[i].value;
}
else
{
illnessId_Array+= ','+chkIllnesList[i].value;
m++;
}
}
}
// alert(patient_ID);
// alert(diagnoseType);
// alert(body_Tempertature);
// alert(is_Zymosis);
// alert(symptomCureCondition);
// alert(diagnoseDesc);
// alert(illnessId_Array);
// alert(clinic_ID);
try
{
var temp = window.external.AddCaseHistoryIllness(
patient_ID,
diagnoseType,
body_Tempertature,
is_Zymosis,
symptomCureCondition,
diagnoseDesc,
illnessId_Array,
clinic_ID);
if(temp>0)
{
alert('新增病例信息成功!');
LightBox.end('lightbox_AddIllness');
flag = true;
}
else
{
alert('新增病例信息失败!');
}
}
catch(e)
{
alert(e.message);
}
return flag;
}1.为什么我成功执行后,catch中的内容依然会执行?
2.参数patient_ID需要从客户端COOKIE里面取,对于客户端设置和获取COOKIE大家有何高见?
3.然后就是对于HTML复选框,如何保证让本身这个框和文本在一块,简单点就是换行时同时换行,不会说框在第一行,文本在第二行。
4.如何控制表格中一行中显示多少个复选框?
本人绝得要分可以去灌水,然后最重要的是交流与沟通,或许你在某个时候也会遇到这样的问题,知道的帮下忙,没遇到的捧个人场,小弟多谢了!
function AddCaseInfoIllness()
{
//验证客户输入的合法性
if(!isDigit())
return;
var flag = false;
var patient_ID = '1';
var diagnoseType = '初诊';
if(document.getElementById('Radio7').checked)
{
diagnoseType = '复诊';
}
else if(document.getElementById('Radio8').checked)
{
diagnoseType = '急诊';
}
else
{
diagnoseType = '初诊';
}
var body_Tempertature = document.getElementById('txtTemperature').value.trim()!=''?document.getElementById('txtTemperature').value.trim():'37';
var is_Zymosis = 'false';
if(document.getElementById('Radio5').checked)
{
is_Zymosis = 'true';
}
var symptomCureCondition = document.getElementById('txtSymptom').value.trim();
var diagnoseDesc = document.getElementById('txtDiagnoseDesc').value.trim();
var clinic_ID = '2';
var chkIllnesList = document.getElementsByName("chkIllnessList");
var illnessId_Array='';
var m=0;
for(i=0;i<chkIllnesList.length;i++)
{
if(chkIllnesList[i].checked)
{
if(m==0)
{
illnessId_Array+= chkIllnesList[i].value;
}
else
{
illnessId_Array+= ','+chkIllnesList[i].value;
m++;
}
}
}
// alert(patient_ID);
// alert(diagnoseType);
// alert(body_Tempertature);
// alert(is_Zymosis);
// alert(symptomCureCondition);
// alert(diagnoseDesc);
// alert(illnessId_Array);
// alert(clinic_ID);
try
{
var temp = window.external.AddCaseHistoryIllness(
patient_ID,
diagnoseType,
body_Tempertature,
is_Zymosis,
symptomCureCondition,
diagnoseDesc,
illnessId_Array,
clinic_ID);
if(temp>0)
{
alert('新增病例信息成功!');
LightBox.end('lightbox_AddIllness');
flag = true;
}
else
{
alert('新增病例信息失败!');
}
}
catch(e)
{
alert(e.message);
}
return flag;
}1.为什么我成功执行后,catch中的内容依然会执行?
2.参数patient_ID需要从客户端COOKIE里面取,对于客户端设置和获取COOKIE大家有何高见?
3.然后就是对于HTML复选框,如何保证让本身这个框和文本在一块,简单点就是换行时同时换行,不会说框在第一行,文本在第二行。
4.如何控制表格中一行中显示多少个复选框?
本人绝得要分可以去灌水,然后最重要的是交流与沟通,或许你在某个时候也会遇到这样的问题,知道的帮下忙,没遇到的捧个人场,小弟多谢了!
调用后台脚本
<td>疾病:</td>
<td id="checkboxAlign" colspan="4"> //初始化
function initCheckboxes()
{
var clinic_ID = '1';
var flag = 'true';
var illnessList = window.external.JSONString(clinic_ID,flag);
illnessList=eval(illnessList);
var oCheckBoxes = document.getElementById("checkboxAlign");
var content = ''; for(var i=0;i<illnessList.length;i++)
{
content += "<input type=\"checkbox\" id=\"chkIllnessList\" name=\"chkIllnessList\" value='"+illnessList[i]["IllnessID"]+ "'" +">" + illnessList[i]["IllnessName"] +" ";
}
oCheckBoxes.innerHTML =content;
}
to :yixianggao(你我他,三人行必有我师焉!) 大哥我的问题具有普遍性,好像你说的都不太需要吧。
这之后还有
LightBox.end('lightbox_AddIllness');
flag = true;
呢。
HTML复选框是什么?“select mutlple”?