Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to remove html tag in jquery.

Output is:

Announcement

rtuee



how can i remove p tag. i'm use rich text box.

What I have tried:

<script type="text/javascript">
$(document).ready(function () {
var id = 0;
$.getJSON('http://localhost:25012/NewsRestService.svc/NewsById/' + id, function (data) {
var out = "";
var i;
for (i = 0; i < data.NewsByIdResult.length; i++) {

out += '

'
+ '
'
+ '

' + data.NewsByIdResult[i].NewsTopic + '

'
+ '

' + data.NewsByIdResult[i].SourceVersion + '

'
}
document.getElementById("hre").innerHTML = out;
});
});
</script>

Posted
Updated 23-Jun-16 3:30am
v3
Comments
Karthik_Mahalingam 23-Jun-16 8:31am    
where do u want to remove ?
Thiyagu Arockiasamy 23-Jun-16 9:32am    
thanks thala i got it
Sergey Alexandrovich Kryukov 23-Jun-16 9:30am    
Rich text box? how? where? :-)
—SA
Thiyagu Arockiasamy 23-Jun-16 9:32am    
Thanks ji i finished
Sergey Alexandrovich Kryukov 23-Jun-16 9:47am    
Excuse me..?
—SA

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900