我在带有asp.net的JavaScript中拥有这段代码
我使用右键菜单,它已经完成,我需要选择要使用的索引行
在我的项目后面的代码中
这是我的代码:
<script type="text/javascript" src="JS/ContextMenu.js"></script>
<script type="text/javascript">
var oCustomContextMenu = null;
var oBase = null;
var Thevalue= null;
window.onload = function()
{
oBase = document.getElementById("GridView1");
var Arguments = {
Base: oBase,
Width: 200,
FontColor: null,
HoverFontColor: null,
HoverBackgroundColor: null,
HoverBorderColor: null,
ClickEventListener: OnClick
};
oCustomContextMenu = new CustomContextMenu(Arguments);
oCustomContextMenu.AddItem('Images/ei0019-48.gif', 'MyIndex', false, 'MyIndex');
}
var OnClick = function(Sender, EventArgs)
{
switch(EventArgs.CommandName)
{
case 'MyIndex':
alert('The Index :');
break;
}
oCustomContextMenu.Hide();
}
window.onunload = function(){ oCustomContextMenu.Dispose(); }
</script>
谁能帮我