惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
Y
Y Combinator Blog
Recorded Future
Recorded Future
博客园 - Franky
I
InfoQ
T
The Blog of Author Tim Ferriss
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
P
Palo Alto Networks Blog
G
GRAHAM CLULEY
Cloudbric
Cloudbric
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Check Point Blog
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
T
Threat Research - Cisco Blogs
U
Unit 42
N
Netflix TechBlog - Medium
The Cloudflare Blog
Spread Privacy
Spread Privacy
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
T
Troy Hunt's Blog
Engineering at Meta
Engineering at Meta
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
B
Blog
S
Securelist
H
Hacker News: Front Page
Google Online Security Blog
Google Online Security Blog
G
Google Developers Blog

博客园 - GO-NET

jQuery选择器总结(转) Js操作Excel常用方法 DataView不能按中文排序问题解决 浮动层居中的对话框效果演示 javascript获得图片的大小 长宽 查找父元素和子元素 javascript设置分页 url参数为page 网页鼠标提示 写一个触发器。从tb_control里删除一条记录,自动把该记录添加到另一个表tb_ctrlHistor中 sql读取指定字符前的字符 数据库对象命名参考 【转】 正则表达式入门教程 权限设计 【数据库和代码】 无限级treeview设计 C#编码建议 【程序权限设计】 ASP.NET设置ie打印两法 生意就是这样做成的 SQL Server 存储过程的经典分页
ajax form提交
GO-NET · 2007-11-21 · via 博客园 - GO-NET

<!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>
    
<title>send string</title>
    
<script language=javascript>
    
    
    
var xmlhttp;
    
function createxmlhttprequest()
    {
    
if(window.ActiveXObject)
    {
    xmlhttp
=new ActiveXObject((navigator.userAgent.toLowerCase().indexOf('msie 5') != -1? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP');
    }
 }
    
function sendstring()
    {
    
for(var i=0;i<2;i++)
    {
    createxmlhttprequest();
    xmlhttp.onreadystatechange
=statechange;
 xmlhttp.open('POST','ajax.aspx',
false);
  xmlhttp.setRequestHeader('Content
-Type', 'application/x-www-form-urlencoded');
 xmlhttp.send(getFormQueryString(
"ff"));
 }
    }
    
function statechange()
    {
    
if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
          document.getElementById(
"x").innerHTML=xmlhttp.responseText;
            }
    }
    
    
function Button1_onclick() {
sendstring();
}
//得到一个表单里的全部信息
function getFormQueryString(frmID)

var frmID=document.getElementById(frmID); 
       
var i,queryString = "", and = "";var item; // for each form's object

       
var itemValue;// store each form object's value

       
for( i=0;i<frmID.length;i++ ) 

       {

              item 

= frmID[i];// get form's each object

              
if ( item.name!='' ) 

              {

if ( item.type == 'select-one' ) 

                     {

                            itemValue 

= item.options[item.selectedIndex].value;

                     }

else if ( item.type=='checkbox' || item.type=='radio') 

                     {

if ( item.checked == false )

                            {

continue;    

                            }

                            itemValue 

= item.value;

                     }

else if ( item.type == 'button' || item.type == 'submit' || item.type == 'reset' || item.type == 'image')

                     {

// ignore this type

                            
continue;

                     }

else 

                     {

                            itemValue 

= item.value;

                     }

                     itemValue 

= encodeURIComponent(itemValue);

                     queryString 

+= and + item.name + '=+ itemValue;

                     and

="&";

              }

       }

return queryString;

}

</script>
</head>
<body  >
 
<form id=ff name=ff>
<input  type=text id="tbx" name="tbx" />
    
<input id="Button1" type="button" value="button" language="javascript" onclick="return Button1_onclick()" /><br />
     
<br />
     
<br />
     
<div id=x></div>
     
     
     asdf
<input id="Checkbox1" name="weew" type="checkbox" />
     
<input id="Radio1" name="sdfsdf" type="radio" />
     
<input id="Radio2" checked="checked" name="fff" type="radio" />
     
<textarea id="TextArea1" cols="20" name="wr2234" rows="2"></textarea>
     
<select id="Select1" name="fff">
         
<option selected="selected" value="1">dsf</option>
         
<option value="2">214312</option>
         
<option value="3">23421</option>
     
</select>
</form>
 
</body>
</html>