0
나는 스크립트를했지만 나는 심지어 발견 된 큰 문제는 내가 여러 번 다시 JQuery와의 호출이 응답하지 않았다 : 여기jquery 콜백이 응답하지 않습니까?
HTML 코드
<h2 class="form_new_project-heading">Please Add Your Information</h2>
<label for="project_URL" class="sr-only">project url</label>
<input type="text" id="project_URL" class="form-control" placeholder="url- http://www.host.com/folder/" data-validation="url" required="" autofocus="">
<label for="callback" class="sr-only">callback</label>
<input type="text" id="callback" class="form-control" placeholder="callback url- http://www.host.com/folder/callpack.html" required="">
<button class="btn btn-lg btn-primary btn-block" id="registernewapp" type="submit">add new project</button>
여기 JQuery와 스크립트를 페이지
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.1.47/jquery.form-validator.min.js"></script>
<script>
$('#registernewapp').click(function(){
var a_data=$('#project_URL').val();
var b_data=$('#callback').val();
$.ajax({
type:"POST",
data:{server:a_data,back:b_data}
url:"http://localhost/",
success: function(msg) {
alert(Data);
}
});
});
의 끝에 코드
url:"http://localhost/",
그래서, 페이지 또는 PHP 파일을 참조로 변경이 유효한 자원을 참조하지 않을 가능성이
:
<script src="http://localhost/ajax/jquery-1.9.0.min.js"></script>
http : // localhost/이것은 무엇입니까? 변수를 어디에 전달하려고합니까? 그것을 파일에 전달해야합니다. 파일 경로는 어디에 있습니까? http : // localhost/그 파일이 아닙니다. –
예 제가 알고 있고 실제로 연결될 수 있습니다 http : //lovalhost/ajax/trojan/vip.php? add = newserver –