Ids must be unique, so you will need to change the id of at least one of them or you will likely experience cross-browser incompatibilities. However, it is OK to have multiple elements with the same class name. So, if you change those id='myid' to class='myid' then use $('.myid:eq(0)').html() to get the innerHTML of the first div. For the second div, change the zero to a ONE.
Ok, thank you. However, i still have a question: how to get the inner html or other property of the element that was just clicked?
For example i have a menu, or some table and the elements of this table have same class but dynamically given different ids. Now i want to get the id value when mouse is clicked on any element of the table. How can i do it? is there anything like this[/COLOR.html()]?