所以我的html文件中有以下情况:
<div id = "imagePreview">
<div id = "earlyDetectionPlots">
<div id = "earlyDetectionScoreMetricsPlots">
</div>
<div id = "earlyDetectionVariableMetricsPlots">
</div>
<div id = "earlyDetectionPseudoStandardizedCoefficientPlots">
</div>
</div>
</div>
我有一个jQuery函数如下:
$(document).on('click', 'a[data-link]', function () {
var $this = $(this);
url = $this.data('link');
$("#imagePreview").load("imageProcess.aspx?" + url);
});
其中url的GET
参数形式为m=2k01&type=EarlyDetection
等。
在我的imageProcess.aspx
文件中,我使用正则表达式从文件夹中抓取一堆图像。
但是,上面的每个div都会有不同的数据。我知道如何决定哪些图片去哪里,但我不知道如何使用c#来说#earlyDetectionScoreMetricsPlots.append("image.png"),
之类的内容,因为我不想将图像直接附加到imagePreview而是{{1}在其中的div,据我所知,我不能在sub
文件中使用jQuery。
(我认为可能有一种方法可以在imageProcess
文件中调用与不同imageProcess.aspx
对应的特定函数,但我不知道如何使用jQuery执行此操作。任何帮助将不胜感激。
答案 0 :(得分:1)
您需要更复杂的jQuery或从#imagePreview
imageProcess.aspx
所需的实际内容