how can i seperately change contents of tags with a specific property
I have 4 "td" tags in my page. every "td" includes a "date and time" like
this:
<td nowrap="">
25/6/1392 14:34
</td>
I want to change the place of day and year: 1392/6/25 14:34 I used below
code:
var van=$("td [nowrap='']:contains('/1392')").text();
var too=van.split(' ');
var tri=too[0];
var fouur=tri.split('/');
$("td
[nowrap='']:contains('/1392')").text(fouur[2]+'/'+fouur[1]+'/'+fouur[0]+'
'+too[1]);
but this code just changes the first td content to what I want and changes
all other td contents to the first td. please help
No comments:
Post a Comment