使用jquery 动态创建form 并提交
2024-10-17 04:10:26
$(document).ready(function(){
$("a.delete").click(function(event){
action = this.getAttribute("action")
form = $("<form></form>")
form.attr('action',action)
form.attr('method','post')
input1 = $("<input type='hidden' name='input1' />")
input1.attr('value','input1 value')
input2 = $("<input type='text' name='textinput' value='text input' />")
form.append(input1)
form.append(input2)
form.appendTo("body")
form.css('display','none')
form.submit()
})
})
最新文章
- Javascript学习笔记:闭包题解(3)
- Java中创建对象的几种方式
- MMORPG大型游戏设计与开发(part1 of net)
- android混合开发,webview的java与js互操作
- Cocos2d-x3.x塔防游戏(保卫萝卜)从零开始(二)
- sort +awk+uniq 统计文件中出现次数最多的前10个单词
- Server.MapPath 的使用方法
- 九度OJ 1468 Sharing -- 哈希
- 【Scala】Scala之Numbers
- opcache开启前后性能对比
- xcode8.3 shell 自动打包脚本 记录
- Python_二叉树
- 一些最常见的SNMP的OID自动翻译成zabbix数字进行表示(华为9306)
- Lua中面向对象
- Elastic Job入门(2) - 使用
- GCN code parsing
- 使用INTERSECT运算符
- 什么是L2 frame?
- javascript基础拾遗(五)
- smarty 双引号中嵌入变量的方法
热门文章
- jade安全转义和非转义
- python 2.7安装pygame报错解决办法pygame-1.9.4-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.
- linux实操_定时任务调度
- 开发中少不了的Fun -- 前端本地存储
- Codeforces Round #592 (Div. 2)【C题】{补题ING}
- [Luogu] 区间统计Tallest Cow
- scrapy框架之Pipeline管道类
- JavaWeb_(Spring框架)xml配置文件
- elasticsearch _bulk api
- javascript中稀疏数组和密集数组