小编Khu*_*ush的帖子

在新窗口中打开图像

如何使用它在新窗口中打开图像id

function swipe()
{   
    var largeImage = document.getElementById('largeImage');
    largeImage.style.display = 'block';
    largeImage.style.width=200+"px";
    largeImage.style.height=200+"px";                   
}
Run Code Online (Sandbox Code Playgroud)

单击图像时调用此函数.现在,它在同一个窗口打开,但我想在新窗口中打开它.如何实现这一目标?

javascript image

12
推荐指数
4
解决办法
8万
查看次数

访问SD卡中的图像

    var pictureSource;   // picture source
    var destinationType; // sets the format of returned value 
    var photoid=window.localStorage.getItem("photoid");
    var photoData=null;
    // Wait for PhoneGap to connect with the device
    //
    document.addEventListener("deviceready",onDeviceReady,false);

    // PhoneGap is ready to be used!
    //
    function onDeviceReady() {
        pictureSource=navigator.camera.PictureSourceType;
        destinationType=navigator.camera.DestinationType;

    }

    // A button will call this function
    //
    function getPhoto(source) {
        alert("Entered sd card");
        // Retrieve image file location from specified source
        navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50, 
                                    destinationType: destinationType.FILE_URI,
                                    sourceType: source });
    }

    function onPhotoDataSuccess(imageData) {
         console.log(imageData); …
Run Code Online (Sandbox Code Playgroud)

javascript cordova

5
推荐指数
1
解决办法
2626
查看次数

从列表中删除项目

我正在创建一个列表,我将通过json数据从列表中添加项目.我面临的问题是我有一个删除按钮,点击按钮后,必须从商店中删除列表中的所选项目.

这就是我尝试过的

{
    text: '',
    id: 'deletenotesBtn',
    iconCls:'trash',
    iconMask: true,
    ui:'action',
    handler: function(){
    var itemSelected = Ext.getCmp('noteslist').getSelection().remove();
    //  this.remove(this, true);
    alert('item deleted');
}
Run Code Online (Sandbox Code Playgroud)

关于我如何实现它的任何建议?

list sencha-touch-2

2
推荐指数
1
解决办法
4285
查看次数

标签 统计

javascript ×2

cordova ×1

image ×1

list ×1

sencha-touch-2 ×1