用javascript方法获取后台传回的list返回值后,如何在前台表格中一行一行显示出来?
发布网友
发布时间:2022-05-16 15:22
我来回答
共4个回答
懂视网
时间:2022-05-16 19:43
Description
Returns a list of features for all the software installed on a computer using Windows Installer. Script Code
代码如下:
var wbemFlagReturnImmediately = 0x10;
var wbemFlagForwardOnly = 0x20;
var objWMIService = GetObject("winmgmts:\\.\root\CIMV2");
var colItems = objWMIService.ExecQuery("SELECT * FROM Win32_SoftwareFeature", "WQL",
wbemFlagReturnImmediately | wbemFlagForwardOnly);
var enumItems = new Enumerator(colItems);
for (; !enumItems.atEnd(); enumItems.moveNext()) {
var objItem = enumItems.item();
WScript.Echo("Accesses: " + objItem.Accesses);
WScript.Echo("Attributes: " + objItem.Attributes);
WScript.Echo("Caption: " + objItem.Caption);
WScript.Echo("Description: " + objItem.Description);
WScript.Echo("Identifying Number: " + objItem.IdentifyingNumber);
WScript.Echo("Install Date: " + objItem.InstallDate);
WScript.Echo("Install State: " + objItem.InstallState);
WScript.Echo("Last Use: " + objItem.LastUse);
WScript.Echo("Name: " + objItem.Name);
WScript.Echo("Product Name: " + objItem.ProductName);
WScript.Echo("Status: " + objItem.Status);
WScript.Echo("Vendor: " + objItem.Vendor);
WScript.Echo("Version: " + objItem.Version);
WScript.Echo();
}
热心网友
时间:2022-05-16 16:51
<c:forEach var=‘list’ items=‘${list}’>//var的值随便起,起啥下面就用啥
${list .id}
${list .name}
</c:forEach>
你那个<%%>中间应该是java代码javascript用<script></script>括起来
热心网友
时间:2022-05-16 18:09
用eval转换成数组再操作
热心网友
时间:2022-05-16 19:44
我觉得吧,list应该是枚举类型的,应该用枚举方式,而不能用索引方式