javascrpit 获取文本框里面数据问题 v1 = document.formname.textname1.value - 0;v2 = document.formname.textname2.value - 0;handan(v1,v2) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <head runat="server"> <title>Untitled Page</title> <script language="javascript"> function Compare(c1, c2) { var value1 = document.getElementById(c1).value; var value2 = document.getElementById(c2).value; if(value1==1&&value2.length!=7){ alert("2222"); } if(value1==2&&valeue2.length!=6){ alert("111"); } } </script></head><body> <form id="form1" runat="server"> <div> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br /> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br /> <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="Compare('TextBox1', 'TextBox2')" /> </div> </form></body> document.getElementById取值的问题 求助:select中的option的快速选择问题 关于用jQuery获取指定URL的源代码的问题 js如何给embed加上allowfullscree属性 让for循环一秒执行一次 javascript 验证输入合法性 正则表达式空格怎么写 如何点击图片时,弹出一个只有关闭按纽的窗口,窗口中是一个图片,窗口大小和图片一样大 如何暂时禁止图片按钮 调用IE的打印为什么总是报告“没有权限”? 菜单联动问题 JavaScript 新建Excel时的糗事.总是出错,高手路过的话别忘了进来看看.
<title>Untitled Page</title>
<script language="javascript">
function Compare(c1, c2)
{
var value1 = document.getElementById(c1).value;
var value2 = document.getElementById(c2).value;
if(value1==1&&value2.length!=7){
alert("2222");
}
if(value1==2&&valeue2.length!=6){
alert("111");
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br />
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="Compare('TextBox1', 'TextBox2')" />
</div>
</form>
</body>