javascript – 试图让XUI正常工作
作者:互联网
我试图让javascript框架XUI工作,但无法让它在任何桌面浏览器上工作.更多关于XUI的信息…… http://xuijs.com/documentation
<script type='text/javascript' src='xui-more-1.0.0.min.js'></script>
<!-- <script type='text/javascript' src='xui-bb-1.0.0.min.js'></script> -->
<script>
x$('button').click(function(e){
alert('tee hee!');
});
x$('a.navigation').css({ background:'yellow' });
alert("at least this works!");
</script>
<a href='http://google.com' class='navigation' >this is a link</a>
<br><br>
<input type='button' id='button' value='click me!'>
解决方法:
您需要将代码包装在“ready”函数中:
<script type="text/javascript">
xui.ready(function() {
// x$code in here...
});
</script>
标签:javascript,frameworks,xui 来源: https://codeday.me/bug/20190730/1581366.html