모달 대화 상자 안에 이미지를 표시하려고하지만 이미지가 표시되지 않습니다. 누군가 이것에 대해 어떤 생각을 가질 수 있습니까? 여기 내 완벽한 HTML 레이아웃입니다. 참고 : div 콘텐츠에는 jquery가 있습니다.자바의 모달 대화 상자에 div 내용 표시
html_content = "
<strong>"+title+"</strong>
<br>
<br>
<img src='"+single_image+"'width='300' height='211'>
<br> "+content+"
<br>"+str+"
<div id='image'></div>
<div id='dialog-modal' title='Basic modal dialog'>
<div id='popup' style='display:none'>"+"
<a id='popup-close' href='' class='button'>"+"Fermer"+"</a>
<p><img id='image-placeholder' width='300px'; height='250px' src=''>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js'></script>
<script type='text/javascript'>
$(document).ready(function() {
$('.popup-open').click(function(e){
$('#popup:visible').hide();
e.preventDefault();
$('#image-placeholder').attr('src', $(this).attr('href'));
$('#popup').fadeIn('fast');
});
$('#popup-close').click(function(e){
e.preventDefault();
$('#popup').fadeOut('fast');
});
});
</script>
";
String mdialog = "
<link rel=\"stylesheet\" href=\"http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css\" />
<script src=\"http://code.jquery.com/jquery-1.8.2.js\"></script>
<script src=\"/resources/demos/external/jquery.bgiframe-2.1.2.js\"></script>
<script src=\"http://code.jquery.com/ui/1.9.1/jquery-ui.js\"></script>
<link rel=\"stylesheet\" href=\"/resources/demos/style.css\" />
<script>
$(function() {
$('#dialog-modal').dialog({height: 140, modal: true});
});
</script>
<meta http-equiv=\"Content-Type\" " +"content=\"text/html; charset=utf-8\">
<style>
#popup{border: 1px solid gray; background-color:black; border-radius: 5px 5px 5px 5px; margin-left:auto; margin-right:auto; position:fixed; top:50px; z-index: 9999;}
</style>
";
String webData = "
<!DOCTYPE html>
<head>
"+mdialog+"
</head>
<body>
"+html_content+"
</tr>
</table>
</div>
</body>
</html>
";
Java! = JavaScript –
이 HTML 파일을 Android webview에로드하려고합니다. 안드로이드 자바 기반의 이유는 내가 자바에 게시 – PIONA
참조하십시오 .load() jquery 함수 –