다음 스크립트가 작동하지 않습니다. 링크를 추가하려면 어떻게해야합니까? jno = "97856483"; dispTitle = "새 책"; dispAuthor = "authorname";자바 스크립트에서 PHP 스크립트로 링크 추가하기
document.getElementById('popups').innerHTML = '';
//Add link to add this book:
var url = encodeURIComponent(jno) + "&tt=" + encodeURIComponent(dispTitle) + "&at=" + encodeURIComponent(dispAuthor);
//document.writeln(url);
document.getElementById("addLink").innerHTML = "<a href='memaccountentry.php?isbn='+ url>Add book</a>" ; //This one just appends the word url.
//window.location.href = 'memaccountentry.php?isbn=' +jno +'&tt=' +dispTitle+'&at=' +dispAuthor; //I know this is working, but not a right way to do.
//I need to put a href link to go to the next page.
//ajax.open('GET', 'memaccountentry.php?isbn=' +jno +'&tt=' +dispTitle+'&at=' +dispAuthor', true);
결코 닫히지 않는 memaccountentry 앞에 작은 따옴표가 하나 있습니다. –
@ Sonal-Patelia : 고맙습니다. – Jocelyn
고마워. 이제 알았다. 나는 몇 시간 동안이 단순한 것을 찾고 있었다. 투표까지! –