[英]Navigating to other page clicking on a image
我是.NET / JS的新手。 我有一個.aspx頁,單擊表上的圖像時,我們必須在其中導航到其他頁面。 圖片應該出現在每一行上,所以我嘗試了
<input type="image" id="dataReview_' + templates[i].dataFileKey + '" title="Data Review" src="Images/datareview.png" style="height: 15px; width: 15px" onclick="dataReview_tasks(this); return false;" />\n' +
所以圖標顯示為
該表具有其他不同的列,其中一個字段是復選框。 現在,當我在表上單擊圖標時,我嘗試導航到其他頁面。 表中的每一行對應不同的值,因此,單擊一行上的圖標時,我們會將表中的數據作為輸入發送到另一頁。 但是現在,我正在嘗試學習如何在不傳遞任何值的情況下從表中的每個圖標鏈接到其他頁面。
function dataReview_tasks(obj) {
var i = 0;
var data_FileKeys = new Array();
$('.chkImport')
.each(function (index, value) {
if ($(this).attr('checked')) {
var info = new IOInfo(this);
data_FileKeys[i] = info.key(0);
i++;
}
});
*** I am not sure how to call the other page here****
}
需要調用的頁面是〜/ GUI / DataReview.aspx
只需按以下步驟更改窗口的位置。
window.location = '/GUI/DataReview.aspx';
如果您的腳本在頁面上,而不是在單獨的javascript文件中,則我強烈建議您使用ASP.NET來解析您的URL,這使您的URL相對於root。
window.location = '<%= ResolveUrl("~/GUI/DataReview.aspx"); %>';
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.