如何使用它在新窗口中打开图像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)
单击图像时调用此函数.现在,它在同一个窗口打开,但我想在新窗口中打开它.如何实现这一目标?
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) 我正在创建一个列表,我将通过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)
关于我如何实现它的任何建议?