该
success函数采用一个参数,其中包含获取的数据。因此,在您的示例中:
$(document).ready( function(){ $.ajax({ type:"GET", url:"file.php", data:id, success:function(txt){ $.prompt( txt,{ opacity: 0.2 }); }, // ... more ... }});更多示例在jQuery文档中。



