-2
这段代码有什么问题?我正在使用jQuery。这段代码有什么问题?
function setPreviewUrl() {
$post_title = $("#post_title").val();
$post_content = $("#post_content").val();
$.get('ajax/base64encode.php?name='+post_title, function(data1) {
var $postTitle = null;
$postTitle = data1;
});
$.get('ajax/base64encode.php?name='+post_content, function(data2) {
var $postCont = null;
$postCont = data2;
});
var $urlExten = null;
$urlExten = '?post_title='+postTitle+'&post_cont='+postCont;
$("a[href*='#change']").attr('href', '<?php echo $site_url; ?>admin/ajax/preview.php'+urlExten);
$("#preview_frame").prop("href", '<?php echo $site_url; ?>admin/ajax/preview.php'+urlExten);
}
你期望它做,当你运行它时会发生什么? – interjay
这是什么问题? – rahul
也许你应该写下你想要达到的要求 –