简体   繁体   English

单击行时如何在对话框中显示行内容

[英]How to display row contents in dialog box when clicking on the row

I am new to javascript and jQuery. 我是javascript和jQuery的新手。 Yesterday I asked this question link and found out how to add rows to table from input values. 昨天我问了这个问题链接,并了解了如何从输入值向表中添加行。 So now I have a table which will create new rows which will display user inputs. 因此,现在我有了一个表,该表将创建将显示用户输入的新行。 Today I am trying to find out how I can display the row contents in a dialog box when I click on a particular row. 今天,我试图找出当单击特定行时如何在对话框中显示行内容。 Any leads, advice, tutes will be useful. 任何线索,建议,建议将是有用的。 Thanks. 谢谢。

Here is a start: 这是一个开始:

Whenever the user clicks on this row, the html will be displayed in the javascript default dialog box. 每当用户单击此行时,html就会显示在javascript默认对话框中。

If you want to do more sophisticated processing you could call a function that will process the rows content using the following: 如果要进行更复杂的处理,可以调用一个函数,该函数将使用以下命令处理行内容:

<script type="text/javascript>
    function processRow(row){
         ...
    }

</script>
...

<tr onclick="processRow(this)">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM