为每个动态链接按钮创建Div标签 [英] Creating Div tag for each dynamic link buttons

查看:70
本文介绍了为每个动态链接按钮创建Div标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建动态链接按钮列表,其中每个 linkbutton 单击必须创建带有文本框和按钮的div标签。当点击第二个链接按钮时,所有创建的div不能消失



DEMO



LinkBut​​ton1 点击创建了一个带有textbox1的div1和一个按钮1



LinkBut​​ton2 点击后创建了一个带有textbox2和button2的div2



Div1创建后必须存在div2创建后



请帮帮我

How can i create dynamic link button list, in which each linkbutton clicked must create a div tag with a text box and a button. and all the div created must not disappear when a second link button is clicked

DEMO

LinkButton1 has clicked created a div1 with textbox1 and a button1

LinkButton2 has clicked created a div2 with textbox2 and a button2

Div1 created must be there even after div2 is created

Please help me

推荐答案

我不太确定链接按钮列表是什么,但这里是你所描述的非常原始的版本。它使用的是jquery,这是一个工作样本...只需将它打成某种类型的html文件,它应该适合你。



Im not quite sure what a "link button list" is but here is a very primitive version of what you''ve described. It is using jquery, this is a working sample...just slap it into a html file of some sort and it should work for you.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript">


(document).ready(function(){
(document).ready(function () {


(#LinkBut​​ton1)。on(click,function(){
("#LinkButton1").on("click", function(){


这篇关于为每个动态链接按钮创建Div标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆