使用dijit/layout/ContentPane的href属性加载页面时,被加载页的dojo代码、javascript代码都不被执行
<div data-dojo-type="dijit/layout/ContentPane" title="基本信息" data-dojo-props='href:"test.html"'></div>test.html:
<html> <head> <script > var s= new dijit.Dialog({ title:"测试页" }).show(); </script> </head> <body></body> </html>
解决办法,使用dojox/layout/ContentPane:
<div data-dojo-type="dojox/layout/ContentPane" title="基本信息" data-dojo-props='href:"test.html"'></div>原文链接:https://www.f2er.com/dojo/291418.html