javascript - Show xml in TextArea using jQuery -
the following works in firefox , chrome, not in ie -
<html> <head> <title>test ie</title> <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> </head> <body> <button onclick="ftest2()">test textarea</button> <br /> <textarea rows="4" cols="50" id="log" > textholder . . . </textarea> <script type="text/javascript" > var currentline = 3; var strxml = "<xmlstring id='misssing' >" + currentline + "</xmlstring>"; function ftest2() { $('#log').html(strxml); } </script> </body> </html>
found -
i had use
$('#log').val(strxml);
instead of
$('#log').html(strxml);
Comments
Post a Comment