在我的服务器端代码,我动态地建立一个表,而现在我加入以下代码来处理该行点击。

tr.Attributes.Add("onclick", "window.open('" + root + document.IPT_Name + "/" + document.IPT_Sub_Name + "/" + document.File_Name + "', 'mywindow', 'toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,copyhistory=no, resizable=yes')");

有没有什么办法,使这项工作只有一个左击,然后添加不同的属性,右键去到不同的位置?

其他提示

这里的取出的一些代码的jQuery 1.3.2 与大约event.whichevent.button解释注释。

// Add which for click: 1 == left; 2 == middle; 3 == right
// Note: button is not normalized, so don't use it
if ( !event.which && event.button )
    event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top