2014-10-16 2 views
0

HTML 파일의 일부 텍스트를 가져 와서 변수에 할당하고 있습니다. 이 변수를 텍스트로 분석하고 싶습니다 : "AB"와 모든 인스턴스 뒤에 줄 바꿈을 삽입하십시오. 여기jQuery를 사용하여 줄 바꿈을 삽입하십시오.

$(flyout).click(function() { 
    WinJS.xhr({ url: "http://somesite.html", responseType: "text" }) 
         .done(function complete(result) { 

    var rawText = result.responseText; 
    var endResult = $(rawText).text(); 

    //need to parse endResult and add 2 line breaks and display in div fetchedtext 


    fetchedtext.innerText = ParsedendResult; 

답변

관련 문제