How to open javascript or jquery popup to display target url in same page either using jquery or javascript can anyone please provide me with a link i have searched on google but was unable to found a valuable thing
4条回答 默认 最新
- dshgnt2008 2012-11-19 06:07关注
Here's some markup..
<a href="http://www.somesite.com"> Some Site Link </a> <div id="popup"> This is the popup text pre $.load() </div>
Here's some code...
$('#popup').dialog({ autoOpen: false, modal: true }); $('a').on('click', function(e){ e.preventDefault(); $('#popup').load($(this).prop('href'), function(){ $('#popup').dialog('open'); }); });
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报