var somefunction=function(){
if(错误)
{
alert();
return false;
}
return true;
};OnClientClick="return somefunction()"
if(错误)
{
alert();
return false;
}
return true;
};OnClientClick="return somefunction()"
解决方案 »
- 这个js请问有人能解密么?并且告诉我解密的方法
- 用js如何读取CDATA中的数据
- class_.prototype = aBaseClass;[/color]//这句话的 深层含义
- 如何用JAVASCRIPT实现打字测试的功能?
- 如何在链接中限定打开窗口的大小???
- 想用js将几个元素放到列表里,怎么有几个不听话啊
- 主页面是一个框架,在左边框架中单吉按钮后弹出一个子窗体,怎么样才能在子窗体关闭的时候,让整个主框架重新定位到一个地址啊?
- FLASH 能不能 把参数传递给网页?
- 在线等:在地址栏输入地址,能否将当前打开的网页变成没有地址栏,状态栏等。
- 请教:我想锁定弹出窗口,即必须先响应子窗口,子窗口关闭后才能够响应父窗口,javascript可以控制么?如何控制?
- 简单的年份数字验证,IE上不能正常运行,而FireFox上可以。求解!
- js 分页技术
{
if(!document.form1.title.value) {
alert('标题不能为空!');
}
else {
document.form1.submit();
}
}<form id='form1' name='form1' method='get'>
<input type="text" name="title" id="title"/>
<input type="button" value="提交" onclick="check();" />
</form>
<script type="text/javascript">
function check()
{
if(!document.form1.title.value) {
alert('标题不能为空!');
}
else {
document.form1.submit();
}
}
</script><form id='form1' name='form1' method='get'>
<input type="text" name="title" id="title"/>
<input type="button" value="提交" onclick="check();" />
</form>