2012-01-03 2 views

답변

0

이 코드는 테스트되지 않았지만 모달의 클릭 기능에 코드를 추가하여 텍스트 영역의 텍스트를 가져온 다음 모달 자체에 전달할 수 있습니다. 그것을 희망을해야

$('a[name=modal]').click(function(e) { 
    //Cancel the link behavior 
    e.preventDefault(); 

    //This is the added part: 
    //Get the textarea's text 
    var taText = $('textarea#myTextArea').val(); 

    //Example - Now add the text to a span tag inside the modal 
    ("#myDiv span").text(taText); 

    ... 

: 그것은 당신이 myTextArea라는 텍스트 영역을 가정하고,이 같은 것입니다.

관련 문제