我有一个弹出窗口,其中iam以表格格式检索数据。在该弹出窗口中,我需要单击一个表行,并且需要在下拉列表中填充所单击的数据。那个dropdownlist值也是从数据库中检索的,我尝试了一些代码,帮我找到答案。 我已经使用js
中的以下函数创建了新窗口 code = 400;
"error_message" = "The access_token provided is invalid.";
"error_type" = OAuthAccessTokenException;
我的主页,其中包含下拉列表
function opentestname() {
window.open('testsearch', 'newwindow',
config = 'height=300,width=500,left=50,top=205,down=25,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,directories=no, status=no');
}
我的弹出窗口
@Html.DropDownListFor(m => m.testname, Model.testname, new { @id = "test", @name = "test", @class = "form-control" })
我的fillparent()就像
<table id="myTable">
<tr class="header">
<th style="width:60%;"> CODE </th>
<th style="width:60%;"> DESCRIPTION</th>
<th style="width:60%;">OPTION</th>
</tr>
@foreach (var items in Model)
{
<tr name="code">
<td >@items.code</td>
<td class="filter">@items.desc</td>
<td><button class="btn btn-primary" type="button" onclick="fillparent(this)";>FILL</button></td>
</tr>
}
</table>
//我不知道如何通过名称获取动态数据并将其填入 dropdownlistfor, 帮我, 谢谢, shankiyan