Javascript 在不同的HTML页面上显示同一对象的JSON属性
我将以下js脚本和json附加到HTML表中 根据表中单击的“MD_百分比”(MD列),我希望它链接到另一个html文档(indexmd.html),并在另一个html表中显示与单击的MD_百分比关联的对象的更多属性(DISCHARGE_NOTE、DN_NOTE_STATUS、HP_NOTE、HP_NOTE_STATUS) 我将该表的MD_PERCENT列作为锚定…但如何使“新表”在单击时显示适当的/相关的数据 希望我的noob问题有意义 主html表:Javascript 在不同的HTML页面上显示同一对象的JSON属性,javascript,jquery,html,json,Javascript,Jquery,Html,Json,我将以下js脚本和json附加到HTML表中 根据表中单击的“MD_百分比”(MD列),我希望它链接到另一个html文档(indexmd.html),并在另一个html表中显示与单击的MD_百分比关联的对象的更多属性(DISCHARGE_NOTE、DN_NOTE_STATUS、HP_NOTE、HP_NOTE_STATUS) 我将该表的MD_PERCENT列作为锚定…但如何使“新表”在单击时显示适当的/相关的数据 希望我的noob问题有意义 主html表: <table class="foo
<table class="footable">
<thead>
<th width="150">Patient Name</th>
<th width="75">FIN</th>
<th width="50">Nurse Unit</th>
<th width="50">Room</th>
<th width="50">Bed</th>
<th width="150">Attending Physician</th>
<th width="100">Length of Stay</th>
<th width="100">Medical Assessment</th>
<th width="50">RT</th>
<th width="50">SW</th>
<th width="50">MD</th>
<th width="50">RN</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
function createPatientTable(json) {
$.each(json.LIST, function(i, COPD_QUAL) {
$('.footable > tbody:last').append('<tr><td>' + COPD_QUAL.PATIENT + '</td><td><a href="javascript:APPLINK(0,\'powerchart.exe\',\'/PERSONID=' + COPD_QUAL.PERSON_ID + ' /ENCNTRID=' + COPD_QUAL.ENCNTR_ID + '\')">' + COPD_QUAL.FIN + '</a></td><td>' + COPD_QUAL.NURSE_UNIT + '</td><td>' + COPD_QUAL.ROOM + '</td><td>' + COPD_QUAL.BED + '</td><td>' + COPD_QUAL.ATTENDING_PHYS + '</td><td>' + COPD_QUAL.LENGTH_OF_STAY + '</td><td id ="medassess" class="assessment ' + getSeverity(COPD_QUAL.MED_ASSESS) + '" onclick="openPowerform(\'' + COPD_QUAL.PERSON_ID + '\', \'' + COPD_QUAL.ENCNTR_ID + '\', \'' + COPD_QUAL.ACTIVITY_ID + '\')">' + COPD_QUAL.MED_ASSESS + '</td><td>' + COPD_QUAL.RT_PERCENT + '\%</td><td>' + COPD_QUAL.SW_PERCENT + '\%</td><td><a href="../indexmd.html">' + COPD_QUAL.MD_PERCENT + '\%</a></td><td>' + COPD_QUAL.RN_PERCENT + '\%</td></tr>');
});
$('.footable').footable();
};
将数据附加到主html表的js函数:
<table class="footable">
<thead>
<th width="150">Patient Name</th>
<th width="75">FIN</th>
<th width="50">Nurse Unit</th>
<th width="50">Room</th>
<th width="50">Bed</th>
<th width="150">Attending Physician</th>
<th width="100">Length of Stay</th>
<th width="100">Medical Assessment</th>
<th width="50">RT</th>
<th width="50">SW</th>
<th width="50">MD</th>
<th width="50">RN</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
function createPatientTable(json) {
$.each(json.LIST, function(i, COPD_QUAL) {
$('.footable > tbody:last').append('<tr><td>' + COPD_QUAL.PATIENT + '</td><td><a href="javascript:APPLINK(0,\'powerchart.exe\',\'/PERSONID=' + COPD_QUAL.PERSON_ID + ' /ENCNTRID=' + COPD_QUAL.ENCNTR_ID + '\')">' + COPD_QUAL.FIN + '</a></td><td>' + COPD_QUAL.NURSE_UNIT + '</td><td>' + COPD_QUAL.ROOM + '</td><td>' + COPD_QUAL.BED + '</td><td>' + COPD_QUAL.ATTENDING_PHYS + '</td><td>' + COPD_QUAL.LENGTH_OF_STAY + '</td><td id ="medassess" class="assessment ' + getSeverity(COPD_QUAL.MED_ASSESS) + '" onclick="openPowerform(\'' + COPD_QUAL.PERSON_ID + '\', \'' + COPD_QUAL.ENCNTR_ID + '\', \'' + COPD_QUAL.ACTIVITY_ID + '\')">' + COPD_QUAL.MED_ASSESS + '</td><td>' + COPD_QUAL.RT_PERCENT + '\%</td><td>' + COPD_QUAL.SW_PERCENT + '\%</td><td><a href="../indexmd.html">' + COPD_QUAL.MD_PERCENT + '\%</a></td><td>' + COPD_QUAL.RN_PERCENT + '\%</td></tr>');
});
$('.footable').footable();
};
函数createPatientTable(json){
$.each(json.LIST,函数(i,COPD_QUAL){
$('.footable>tbody:last')。追加(''+COPD患者资格+''+COPD护理单位资格+''+COPD病房资格+''+COPD病床资格+''+COPD病床资格+''+COPD病床资格+''+COPD住院时间资格+''+COPD医疗资格评估+''+COPD患者资格百分比+COPD患者资格百分比+COPD患者资格百分比+COPD患者资格百分比+COPD患者资格百分比+COPD患者资格百分比+;
});
$('.footable').footable();
};
我希望显示其他信息的md html表:
<h3>Patient Name</h3>
<table id="tablemd">
<thead>
<tr>
<th>Discharge Note</th>
<th>Discharge Note Status</th>
</tr>
<tr>
<td>General Procedure</td>
<td>Auth (Verified)</td>
</tr>
</thead>
<tbody>
<tr>
<th>H&P Note</th>
<th>H&P Note Status</th>
</tr>
<tr>
<td>Admission H&P</td>
<td>Auth (Verified)</td>
</tr>
</tbody>
</table>
患者姓名
出院通知单
出院通知状态
一般程序
认证(已验证)
H&P票据
H&P票据状态
H&P的入场券
认证(已验证)
如果您更改页面,例如从index_1.html
更改为index_2.html
,则几乎没有参考。您无法在index_2.html
上确定在第一页上单击了什么
你必须自己创建某种引用。例如,查询字符串参数
您可以阅读有关查询字符串的内容
如果您想知道,在index_2.html上使用了was查询字符串,您可能需要使用一些javascript代码来解析查询字符串
在收到必要的参数后,您可以过滤数据并仅获取所需的零件