我正在使用 ajax post 将我的值发送到(uploadsignupeditadvcheck.php)。提交成功后,我需要刷新我的div标签(galleryadv)以准备下次提交。我的 ajax 提交成功,但刷新后我的 jquery 函数不再工作。我很感激你们,可以帮助解决我的情况。谢谢。
索引.php
<script>
function uploadadv(){
var idadv = document.getElementById("idadv").value;
var companynameadv = document.getElementById("companynameadv").value;
var usernameadv = document.getElementById("usernameadv").value;
var aboutmeadv = $("#aboutmedecsadv").val();
var catadv = document.getElementById("catadv").value;
var typeadv = document.getElementById("typeadv").value;
var keywordadv = document.getElementById("keywordadv").value;
var addressadv = document.getElementById("addressadv").value;
var countryadv = document.getElementById("countryadv").value;
var zipadv = document.getElementById("zipadv").value;
var stateadv = document.getElementById("stateadv").value;
var cityadv = document.getElementById("cityadv").value;
var urladv = document.getElementById("urladv").value;
var priceadv = document.getElementById("priceadv").value;
var advstamp = document.getElementById("advstamp").value;
jQuery.ajax({
type: "POST", // HTTP method POST or GET
url: "uploadsignupeditadvcheck.php", //Where to make Ajax calls
dataType:"text", // Data type, HTML, json etc.
data:myData, //Form variables
success:function(data){
$('#messageeditcheckadv').html(data);
},
uploadsignupeditadvcheck.php
$(".galleryadv").load(location.href+" .galleryadv>*");
SMILET