处理程序:';html';,大小:{x:265,y:650}到100%


handler: 'html', size: {x: 265, y: 650} to 100%

我需要帮助。我需要获得y:650到100%,但它不允许我输入类似100%的内容。有其他方法吗。

request.onreadystatechange = function () {
            if (request.readyState == 4 && request.status == 200) {

                var responce = request.responseText;
                var options = {url: detailurl, handler: 'html', size: {x: 265, y: 650}, htmldata: responce,pid:product_id};
                redBOX.initialize({});
                document.attbox = redBOX.open(null, options);
                // preload slimbox
                var imagehandle = {isenable: false, mainImage: false};
                preloadSlimbox(imagehandle);
                var el = RedgetElementsByClassName('calendar');
                for (i = 0; i < el.length; i++) {
                    // do stuff here with myEls[i]
                    var calImgId = el[i].id;
                    arr = calImgId.split("_img");
                    n = arr.length;
                    var calName = arr[0];
                    var realname = calName.split("ajax");
                    if ((calImgId.search('ajax') != -1) && (extrafieldNames.search(realname[0]) != -1)) {
                        window.addEvent('domready', function () {
                            Calendar.setup({
                                inputField: calName,     // id of the input field
                                ifFormat: "%d-%m-%Y",      // format of the input field
                                button: el[i].id,  // trigger for the calendar (button ID)
                                align: "Tl",           // alignment (defaults to "Bl")
                                singleClick: true
                            });
                        });
                    }
                }
            }
        };

谢谢。

尝试使用javasript:

size:{x:265,y:parseInt(document.getElementsByTagName("html")[0].style.width)}

您是否尝试过使用:

$('html').width()

例如:

size: {x: 265, y: $('html').width()}

试试这个,

size: {x: 265, y: $('html').css('width')}

对于设置宽度,您可以尝试

 size: {x: 265, y: $('html').css('width','100%')}