注册 登录
编程论坛 ASP.NET技术论坛

我要如何取得<TD>内的值?

wube 发布于 2017-06-28 15:37, 4244 次点击
*.aspx
程序代码:

<!-- ▼▼课程播放-个人播放课程▼▼ -->
<asp:Panel ID="pnlClassPlay" runat="server">
    <div align="right">
        <asp:LinkBut&#8203;&#8203;ton ID="lkbReturnToList" runat="server" Text="回前页" Font-Underline="True" />
    </div>
    <h4>
        CLASS PLAY</h4>
    <h3>
        课程播放</h3>
    <table width="720px">
        <tr>
            <td width="50%" align="right">
                阅读时间:
            </td>
            <td width="50%" id="TimerText" align="left">
            </td>
        </tr>
    </table>
    <table width="720px">
        <tr>
            <td>
                <video id="MyVideo" runat="server" controls="True" autoplayer="True" type="video/mp4">
                您的浏览去不支援 HYML5 标签</video>
            </td>
        </tr>
    </table>
</asp:Panel>
<!-- ▲▲查询列表-个人播放课程▲▲ -->


*.aspx.vb
程序代码:

Protected Sub ListView2_ItemCommand(sender As Object, e As System.Web.UI.WebControls.ListViewCommandEventArgs) Handles ListView2.ItemCommand
        Dim hdfFileListNo As HiddenField = e.Item.FindControl("hdfFileListNo")
        Dim hdfFileListSubNo As HiddenField = e.Item.FindControl("hdfFileListSubNo")
        Dim hdfFileName As HiddenField = e.Item.FindControl("hdfFileName")
        Dim strFilePath As String = ConfigurationManager.AppSettings(strCnnType & "BTA_Class_Files").ToString & "/" & hdfFileListSubNo.Value & "/" & hdfFileName.Value
        pnlMyClassList.Visible = False
        pnlClassPlay.Visible = True

        MyVideo.Attributes.Add("src", strFilePath)
        MyVideo.Attributes.Add("Width", "720px")
        MyVideo.Attributes.Add("Height", "600px")
        MyVideo.Attributes.Add("Autoplayer", "True")
    End Sub

'回前页
  Protected Sub lkbReturnToList_Click(sender As Object, e As System.EventArgs) Handles lkbReturnToList.Click
    Dim TimerText1 As HtmlControl = Page.Items.Item("TimerText")  'TimerText内的值我要如何取得?
    pnlClassPlay.Visible = False
    pnlMyClassList.Visible = True
    pnlEmpGroups.Visible = False
    Call LoadMyClass(0, Session("LoginNo"))
  End Sub


就差这步了...
1 回复
#2
zcdjt2019-06-27 17:19
js根据id可以取到
1