12345678910111213141516171819202122232425262728 |
- /**提示 */
- function tooltip(file,type){
- //页面层
- title = '提示信息';
- switch (type) {
- case 1:
- title="圖形提示";
- break;
- case 2:
- title="文字提示";
- break;
- default:
- title="文字提示";
- break;
- }
- var filename = "image/"+file;
- var img = new Image();
- img.src = filename;
- img.onload = function() {
- var html = "<div><img src='"+filename+"'/> </div>";
- layer.open({
- type: 1,
- content: html,
- area: [img.width+20+'px', img.height+60+'px'],
- title:title,
- });
- };
- }
|