需要帮助拖动调整HTML列表框的大小 [英] Need help in dragging resizing HTML list box

查看:154
本文介绍了需要帮助拖动调整HTML列表框的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i需要一些帮助。

是否有一种方法可以调整HTML列表框和其他html元素的大小

i已经尝试过walterzoner调整库大小,但是用于图像和< div>

i需要调整列表框的大小

是否可能

hi
i need some help.
is there a way that the HTML list box and other html elments can be resized
i have tried walterzoner resize library but that is for images and <div>
i need resizing for the list box
is it possible

推荐答案

嗨亲爱的


[HTML]< script language =" javascript">

函数调整大小()

{

oList = document.getElementById(''myList'');


alert(oList.size);


oList.size = 10;

oList.style.width = 200 +''px'';

}

< / script>

< / head>


< body>

< select name ="选取[大小= QUOT; 5英寸ID = QUOT; myList中" >

< option> item1< / option>

< option> item2< / option>

< option> item3< / option>


< / select>


< input type =" button"的onclick = QUOT;调整大小()"值= QUOT;调整" /> [/ HTML]


i希望它对你有用。


如果你想让它变得更好draging,只需要在你的dragind starged时设置该功能,如果你需要帮助重新调整当draginig再次发送消息时。


但如果你知道如何使一个对象可以拖动你可以做到也好。


问候。

mh
hi dear

[HTML]<script language="javascript">
function resize()
{
oList = document.getElementById(''myList'');

alert(oList.size);

oList.size = 10;
oList.style.width = 200+''px'';
}
</script>
</head>

<body>
<select name="select" size="5" id="myList" >
<option>item1</option>
<option>item2</option>
<option>item3</option>

</select>

<input type="button" onclick="resize()" value="resize" />[/HTML]


i hope it will usefull for you.

if you want to make it rsing when draging ,just need to set the function when your dragind starged ,if you need help on resizing when draginig send message again.

but if you know how make an object dragable you can do it too.

regards.
mh



嗨亲爱的


[HTML]< script language =" javascript">

函数调整大小()

{

oList = document.getElementById(''myList'');


alert(oList.size);


oList .size = 10;

oList.style.width = 200 +''px'';

}

< / script>

< / head>


< body>

< select name =" select"大小= QUOT; 5英寸ID = QUOT; myList中" >

< option> item1< / option>

< option> item2< / option>

< option> item3< / option>


< / select>


< input type =" button"的onclick = QUOT;调整大小()"值= QUOT;调整" /> [/ HTML]


i希望它对你有用。


如果你想让它变得更好draging,只需要在你的dragind starged时设置该功能,如果你需要帮助重新调整当draginig再次发送消息时。


但如果你知道如何使一个对象可以拖动你可以做到也好。


问候。

mh
hi dear

[HTML]<script language="javascript">
function resize()
{
oList = document.getElementById(''myList'');

alert(oList.size);

oList.size = 10;
oList.style.width = 200+''px'';
}
</script>
</head>

<body>
<select name="select" size="5" id="myList" >
<option>item1</option>
<option>item2</option>
<option>item3</option>

</select>

<input type="button" onclick="resize()" value="resize" />[/HTML]


i hope it will usefull for you.

if you want to make it rsing when draging ,just need to set the function when your dragind starged ,if you need help on resizing when draginig send message again.

but if you know how make an object dragable you can do it too.

regards.
mh



我需要的功能可以帮助我调整大小我想要的任何高度或宽度,不只是200Px,而且我也希望帮助将列表框移动到html页面的任何位置

WELL I NEED FUNCTIONS THAT CAN HELP ME RESIZE TO ANY HEIGHT OR WIDTH I WANT, Not Just THE 200Px, and i m also lookin for help to move the list box anywhere in the html page


嗨亲爱的

200px只是一个例子,您可以使用文本框值更改它以使其成为动态或使其成为鼠标XY坐标的值。


并使用[对象] .style.top和[Object] .style.left你可以修复位置。

你必须注意,在使用这些syles之前你必须设置元素位置的样式:absolut。


最好的问候。

mh
hi dear
the 200px was just an example, and you can change it with a text box value for make it dynamik or make it the value of your mouse XY coordinates.

and with the [Object].style.top and [Object].style.left you can fix the position.
you must attention , before use these syles you must set the style of your element position: absolut .

best regards.
mh


这篇关于需要帮助拖动调整HTML列表框的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆