2012-03-09 5 views
0
양식은 다음과 같습니다

과 양식을 게시하려면 북마크를 가져올 수 없습니다 :

<form action='localhost/test.php' method='post' target='test'> 
<input type='text' name='add_to_url' value='' /> 
<input type='submit' name='submit' value='Go' /> 
</form> 

그리고 나는 근처에도 와서 아무것도 얻을 수 없습니다.

북 마트는 현재 웹 페이지 URL을 add_to_url 값으로 사용하고 양식을 제출하는 것이 가장 이상적입니다.

모든 리드?

답변

0

Search Bookmarklets에 북마크 자바 스크립트 코드를 검색 할 수 있습니다 것은 양식을 작성하는 자바 스크립트 코드이며, 그것을 게시하십시오. 당신은 여기, 간단한 북마크 생성기입니다 get2post('http://site.com?a=1&c=2');

처럼 사용하거나 다른 사람을 위해 구글 : http://chris.zarate.org/bookmarkleter

function get2post(u, t) { // u = url, t = target 
    var p = u.split('?')[0]; 
    var q = u.split('?')[1].split('&'); 
    var d = document; 
    var f = d.createElement("form"); 
    f.setAttribute('action', p); 
    f.setAttribute('method', 'POST'); 
    f.setAttribute('target', t || '_parent'); 
    f.style.display = 'none'; 
    for (i = 0; i < q.length; i++) { 
     var e = d.createElement("input"); 
     var param = q[i].split('='); 
     e.name = param[0]; 
     if (param.length >= 2) e.value = decodeURIComponent(param[1]);   
     f.appendChild(e); 
    } 
    d.body.appendChild(f); 
    f.submit(); 
}