我想了解一下noscript这个标签究竟是怎么用的?哪位高手能具体的讲一讲呀?我做了一个小小的注册系统,里面用JS来检测填写的表单,但我禁止了IE的javascript之后,运行时还是一样执行了JS了,而打开QQ空间就会提示我的JS给禁止了,那为什么我的程序还是执行了JS呢?我想要做的是,当用户的浏览器禁止了JS,我就像Qzone那样提示他开启那项功能,具体是要怎么实现的呢?
<noscript>怎么用啊?
<noscript>怎么用啊?
解决方案 »
- 关于使用js编写的代码,为什么我的在非ie浏览器中不能正常显示,请大家帮帮忙……
- 《Javascript DOM高级程序设计》这本书咋样?
- 请帮助查看用document.write总是返回[object]问题的原因
- javascript右下角弹窗,弹窗数量无上限问题。
- 那位高人能帮忙解决一下!为什么window.open(URL,"_blank")后,不执行window.print()。如何解决?
- 怎样通过点击随机的按钮让它在文本框中自动产生一个随机数
- 关于JFTPServer求助大虾
- 一个日期问题!
- 网页头部属性设置<meta name="" content="">的 一些问题
- 请问这个for循环如和实现。
- 有用过51地图的朋友进来指点一下,谢谢了
- jquery 模式对话框问题
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>新用户注册</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/JavaScript">
<!--
function strLength(str){
var value = escape(str);
var len=0;
for(i=0;i<value.length;i++){
var ch=value.charAt(i);
if(ch=='%'){
if( value.charAt(i+1)=='u' ){
var is_kana = false ;
if(value.charAt(i+2)=='F' && value.charAt(i+3)=='F'){
var cd = parseInt(value.charAt(i+4).toString()+value.charAt(i+5).toString(),16);
if( 0x61 <= cd && cd <= 0x9F )
is_kana = true ;
}
i+=5;
len++;
if( is_kana )
continue;
}else
i+=2;
}
len++;
}
return len;
}function checkForm()
{
var f=document.form1
if(f.agree.checked==false)
{
window.alert("请先阅读并同意服务协议!")
f.agree.focus();
return false;
}
if(f.nikename.value=="")
{
window.alert("请输入您的昵称!");
f.nikename.focus();
return false;
}
if(strLength(f.nikename.value)<4||strLength(f.nikename.value)>20)
{
window.alert("昵称不符合规则,4-20个字符!")
f.nikename.focus();
return false;} if(f.username.value=="")
{
window.alert("请输入您的用户名!");
f.username.focus();
return false;
}
if(strLength(f.username.value)<4||strLength(f.username.value)>20)
{
window.alert("用户名不符合规则,4-20个字符!")
f.username.focus();
return false;}
if(f.password1.value=="")
{
window.alert("请输入您的密码!");
f.password1.focus();
return false;
}
if(strLength(f.password1.value)<6||strLength(f.nikename.value)>20)
{
window.alert("密码不符合规则,6-20个字符!")
f.password1.focus();
return false;} if(f.password2.value=="")
{
window.alert("请输入您的重复密码!");
f.password2.focus();
return false;
}
if(f.password2.value!=f.password1.value)
{
window.alert("两次输入密码不相符!")
f.password2.focus();
return false;
}
if(f.question.value!=""&f.answer.value=="")
{
window.alert("找回密码答案不能为空!")
f.answer.focus();
return false;
} if(!/\w+@\w+(\.\w+)+/ig.test(f.eMail.value))
{alert('邮件地址不对');
f.eMail.focus();
return false;}
if(!f.sex[0].checked&&!f.sex[1].checked){
alert("请选择性别");
//f.sex.focus();
return false;}
if(f.safecode.value=="")
{
alert("请输入验证码!");
f.safecode.focus();
return false;
}
return true
}
//-->
</script><noscript>你的浏览器不支持JavaScript!</noscript></head><body>
<form id="form_register" name="form1" method="post" action="register_check.asp">
<table width="660" border="0" align="center" cellpadding="2" cellspacing="1" id="register_table">
<tr>
<td width="14%"><div align="right">昵称:</div></td>
<td width="31%"><label>
<input name="nikename" type="text" id="nikename" />
</label></td>
</tr>
<tr>
<td width="14%"><div align="right">用户名:</div></td>
<td><label>
<input name="username" type="text" id="username" />
</label></td>
</tr> <tr>
<td colspan="2"><label>
<input type="submit" name="Submit" value="注册" onclick="return checkForm();" />
<input type="reset" name="Submit2" value="重置" />
</label></td>
</tr>
</table>
</form><!--#include file="bottom.html"-->
</body>
</html>
代码大概这些,中间有些累赘的我删除了,因为我是用TABLE做的,所以烦请慢慢看了
<tr>
<td colspan="2"><label>
<input type="submit" name="Submit" value="注册" onclick="return checkForm();" />
<input type="reset" name="Submit2" value="重置" />
</label></td>
</tr>
</table>
</form><!--#include file="bottom.html"-->
</body>
</html>======>[code]
<tr>
<td colspan="2"><label>
<input type="submit" name="Submit" value="注册" onclick="return checkForm();" />
<input type="reset" name="Submit2" value="重置" />
</label></td>
</tr>
</table>
</form><!--#include file="bottom.html"-->
</body>
</html>
[/code]
把IE设置.高级.允许活动内容在我的计算机上的文件中运行的勾去掉试试.
这里我的浏览器默认已经没有打勾的了我试着把"安全"---“本地Intranet”里的"Java小程序脚本"和"活动脚本"都关了之后,确实可以了,一点提交就跳到检查页面了,但我里面有不是有一句<noscript>的吗?没有显示出来,那noscript怎么用?怎么可以像QQ空间那样可以提示人??