js<head>与</head>之间的函数数量有限制? 我用Dreamweaver写代码。最近发现当编码用:<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>在<head>与</head>之间放的函数过多时,中文的界面就会乱码,数量少时显示又没问题,改为gb2312就行。不知道哪位碰到过没有? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!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><script type="text/javascript" language="javascript">var test_obj = document.getElementsByName("queue_model"); var temp_test = false; for(var i = 0; i < test_obj.length; i++){ if(test_obj[i].checked) { var sex = test_obj[i].value; temp_test = true; break; }}function queue_model_fifo(){ var xmlhttp1; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp1=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp1.open("GET","/cgi-bin/queuemodel_FIFO.cgi?t=" + Math.random(),true); xmlhttp1.send();}function queue_model_lifo(){ var xmlhttp; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true); xmlhttp.send();}function update_chailman_num(){ var xmlhttp; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST","/cgi-bin/chailman_num.cgi?t=" + Math.random(),true); xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");//固定格式 xmlhttp.send(document.getElementById("12").value);}function update_speak_num(){ var xmlhttp; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST","/cgi-bin/speak_num.cgi?t=" + Math.random(),true); xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");//固定格式 xmlhttp.send(document.getElementById("13").value);}function queue_model_fifo(){ var xmlhttp; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","/cgi-bin/queuemodel_FIFO.cgi?t=" + Math.random(),true); xmlhttp.send();}function queue_model_lifo(){ var xmlhttp; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true); xmlhttp.send();}function queue_model_lifo(){ var xmlhttp; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true); xmlhttp.send();}function queue_model_lifo(){ var xmlhttp; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true); xmlhttp.send();}function queue_model_lifo(){ var xmlhttp; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true); xmlhttp.send();}function queue_model_lifo(){ var xmlhttp; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true); xmlhttp.send();}function queue_model_lifo(){ var xmlhttp; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true); xmlhttp.send();}</script><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>无标题文档</title></head><body><p>队列模式: <input type="radio" name="queue_model" id="1" value="1" onclick="queue_model_fifo()"/> aaa <input type="radio" name="queue_model" id="2" value="2" onclick="queue_model_lifo()"/> bbb</p></body></html>中间的代码是复制的,一预览就这样了。去掉其中任何一个function就好了。 新建了个文本,改为html格式,代码复制进去,预览好了!真是见鬼!散分! 把你的文件格式改成utf8。。另外你代码的前几行肯定不会像你预期那样 test_obj 一直都是空数组 JS控制window.open弹出的窗口关闭 iframe嵌套网页的链接怎么跳转到父页面 请教,这个正则为什么出错? extJs的表格控件的小疑问 50分求解,多个iframe内嵌表单提交的问题 比如getElementsByName("termName")[0].value = "aaaa";界面上午变化? 这是一段什么东西? 自动刷新 我用window.open打开父子孙三个窗口,但是发现子孙都在一个窗口,如何打开三个不同的窗口 急急 关于jquery自己写插件的问题。。高手来。速来围观 jquery 替换字符 【急】
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" language="javascript">
var test_obj = document.getElementsByName("queue_model");
var temp_test = false;
for(var i = 0; i < test_obj.length; i++){
if(test_obj[i].checked)
{
var sex = test_obj[i].value;
temp_test = true;
break;
}
}
function queue_model_fifo()
{
var xmlhttp1;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp1=new XMLHttpRequest();
}else{// code for IE6, IE5
xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp1.open("GET","/cgi-bin/queuemodel_FIFO.cgi?t=" + Math.random(),true);
xmlhttp1.send();
}
function queue_model_lifo()
{
var xmlhttp;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}else{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true);
xmlhttp.send();
}
function update_chailman_num(){
var xmlhttp;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}else{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("POST","/cgi-bin/chailman_num.cgi?t=" + Math.random(),true);
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");//固定格式
xmlhttp.send(document.getElementById("12").value);
}function update_speak_num(){
var xmlhttp;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}else{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("POST","/cgi-bin/speak_num.cgi?t=" + Math.random(),true);
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");//固定格式
xmlhttp.send(document.getElementById("13").value);
}
function queue_model_fifo()
{
var xmlhttp;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}else{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","/cgi-bin/queuemodel_FIFO.cgi?t=" + Math.random(),true);
xmlhttp.send();
}
function queue_model_lifo()
{
var xmlhttp;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}else{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true);
xmlhttp.send();
}
function queue_model_lifo()
{
var xmlhttp;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}else{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true);
xmlhttp.send();
}
function queue_model_lifo()
{
var xmlhttp;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}else{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true);
xmlhttp.send();
}
function queue_model_lifo()
{
var xmlhttp;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}else{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true);
xmlhttp.send();
}
function queue_model_lifo()
{
var xmlhttp;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}else{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true);
xmlhttp.send();
}
function queue_model_lifo()
{
var xmlhttp;
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}else{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","/cgi-bin/queuemodel_LIFO.cgi?t=" + Math.random(),true);
xmlhttp.send();
}</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>无标题文档</title>
</head><body>
<p>队列模式:
<input type="radio" name="queue_model" id="1" value="1" onclick="queue_model_fifo()"/>
aaa
<input type="radio" name="queue_model" id="2" value="2" onclick="queue_model_lifo()"/>
bbb
</p>
</body>
</html>
中间的代码是复制的,一预览就这样了。去掉其中任何一个function就好了。