Local javascript in uihtml
古いコメントを表示
How can I use locally installed javascript libraries in an App Designer uihtml component?
I managed to successfully run the code below with the MATLAB web browser.
But it's not possible to get the same result in a uihtml figure. No warning or error.
I hoped that the javascript interpreter is the same...
Examples like the Code MATLAB Response to Data Change in JavaScript from https://www.mathworks.com/help/matlab/ref/uihtml.html are working.
jquery_example.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery Document Ready Demo</title>
<script type="text/javascript" src="{LOCAL PATH TO INSTALLATION FOLDER}\jquery.min.js"></script>
<script>
$(document).ready(function(){
$("p").text("Hello World!");
});
</script>
</head>
<body>
<p>Not loaded yet.</p>
</body>
</html>
uihtml mockup code:
fig = uifigure('Position',[561 497 333 239]);
h = uihtml(fig);
h.HTMLSource = 'jquery_example.html'
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!