$('#btn1').click(function(){
artDialog({title:'图片查看', content:'<img width="817" height="479" src="http://www.hunanyishi.cn/images/main.jpg" />', fixed:true});
return false;
});
$('#btn2').click(function(){
artDialog({title:'google', url:'http:///p/artdialog/', width:640, height:320});//url参数其实就是iframe
return false;
});
$('#btn3').click(function(){
artDialog({title:'功夫兔', content:'<object width="420" height="363"><param name="movie" value="http://www.tudou.com/v/bXwe7XgTxuA"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="wmode" value="opaque"></param><embed src="http://www.tudou.com/v/bXwe7XgTxuA" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="opaque" width="420" height="363"></embed></object>', fixed:true});
return false;
});
$('#btn4').click(function(){
artDialog({content:'你人品稳定么?', fixed:true, yesText:'我很稳定', style:'confirm'}, function(){alert('你是好人');}, function(){alert('你是坏人');});//style参数可以填写多个,用空格隔开。具体有什么请看皮肤css文件
return false;
});
$('#btn5').click(function(){
artDialog({content:'你是坏人', style:'alert', lock:true}, function(){});//lock参数就是锁屏,它会中断用户操作,用于显示非常重要的消息。慎用
return false;
});
$('#btn6').click(function(e){
//获取对象的坐标,让对话框在按钮附近弹出
var e = e || window.event,
_x,
_y;
if(e.pageX || e.pageY){
_x = e.pageX;
_y = e.pageY;
} else {
_x = e.clientX + document.body.clientLeft;
_y = e.clientY + Math.max(document.body.scrollTop, document.documentElement.scrollTop);
};
var _this = this;
artDialog({id:'menu_4834783',content:'<input style="width:200px;" id="M_dfd" type="text" value="hello world!" />',x:_x, y:_y, style:'noTitle noBorder'}, function(){ _this.innerHTML = $('M_dfd').value; });//使用id参数,可以防止点击弹出多个对话框
return false;
});
$('#btn7').click(function(){
artDialog({content:'您收到 <strong>2</strong> 条消息', x:'right', y:'bottom', time:'100', fixed:true});//x和y坐标可以使用关键字,当然也可以使用数字
return false;
});
artDialog 简单几种用法
原创
©著作权归作者所有:来自51CTO博客作者微客鸟窝的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Artemis 命令用法
Artemis高级用法
读取文件 shell脚本 批量删除 mq artemis -
artDialog弹窗
详情可参考上传附件:
artDialog 弹窗 上传 -
artDialog弹窗使用小结
最近在做项目的时候需要对很多的页面进行改造,将已有的页面已div的形式弹出来,自己在
默认皮肤 新版本 chrome -
TabLayout 的几种用法
1.结合ViewPager使用这是最常见的用法了,实现也比较简单。布局文件:<android.support.design.widget.TabLayout android:id="@+id/tab_book" android:layout_width="match_parent" android:layout_height
TabLayout RadioGroup HorizontalScrollView android ide
















