我正在尝试让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!'>发布于 2011-08-12 20:54:00
你需要将你的代码包装在一个“就绪”函数中:
<script type="text/javascript">
xui.ready(function() {
// x$ code in here...
});
</script>发布于 2011-02-11 00:25:22
给你,这是一个例子
x$(window).on('load', function() {
x$('#button').click(function () {
alert('Hello');
});
});发布于 2010-09-25 03:01:21
Robert-没有错误,但它不工作!
尝试:
x$('#img_del1').on( 'click', function(e){ 还要将js移动到页面的底部。
我还没有在XUI中找到与$(document).ready()对应的东西。
https://stackoverflow.com/questions/3734442
复制相似问题