易截截图软件、单文件、免安装、纯绿色、仅160KB

神奇的Javascript BUG。求高手指点!

JScript code:

<form id="myform" name="myform">

<input type='hidden' name='maxp' value='6'></input>
<input type='text' id='pageinput' onkeydown="if(event.keyCode==13)
{
alert(document.getElementById('pageinput').value ==10);
alert(document.getElementsByName('maxp')[0].value ==6);
alert(10<=6);
alert(document.getElementById('pageinput').value <= document.getElementsByName('maxp')[0].value);
return false;
}" name='pageinput' size=2 maxlength=2>

</form>


当你在文本框中输入10,按回车后,你会发现第4个弹出提示竟然是true,太神奇了,小弟百思不得其解,10怎么会小于6呢?望高手指点小弟迷津。感激流涕!急,在线等。
HTML code:

<form id="myform" name="myform">

<input type='hidden' name='maxp' value='6'></input>
<input type='text' id='pageinput' onkeydown="if(event.keyCode==13)
{
alert(document.getElementById('pageinput').value ==10);
alert(document.getElementsByName('maxp')[0].value ==6);
alert(10<=6);
alert(parseFloat(document.getElementById('pageinput').value) <= parseFloat(document.getElementsByName('maxp')[0].value));
return false;
}" name='pageinput' size=2 maxlength=2>

</form>



相关问答:

求JAVASCRIPT如何操作RADIODOWNLIST

我把RADIOBUTTONLIST嵌套在GRIDVIEW中

实现当点击GRIDVIEW头中的RADIOBUTTONLIST的某一项时

下边行中的RADIOBUTTONLIST 也随之变化

分不多。。谢谢了
浏览器还明遨游的。。谢谢了

引用
......

javascript 遍历树节点

如题!
javascript 如何遍历树节点,可得到节点的 title 值
ding

引用
ding


谢谢

你可以通过id的规律遍历,为通用起见我写了个递归函数如下:
HTML code:

<html xmlns="http ......

flex与javascript交互问题

在javascript中调用flex中的方法时
用document.getElementById("flexObject").flexfunction("param");
flexObject是其html模板中的id或者name,即相对应的flex的实例化对象.
要在flex ......

急救。javascript..强人来

<html>
<head>
    <title>AAA </title>
    <script type="text/javascript">
    function Test(msg)
    ......

关于JavaScript传递数据的问题!

这个表单的数值不是固定的!当按下停止按钮的时候最终的数字才会停在上面!
我想把最后停下的数字传送传送到下一个ASP页面上去!
不想使用location.href="mnn.asp?action="+ok1这样的方式传送过去 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号