我已经在jquery中创建了动态div ...现在onbutton click事件我想让这个div显而易见的假...我如何在jquery&中得到这个div的id使这个div可见假? [英] i have created dynamic div in jquery...now onbutton click event i want to make visible false of this div...how do i get id of this div in jquery & make this div visible false?
本文介绍了我已经在jquery中创建了动态div ...现在onbutton click事件我想让这个div显而易见的假...我如何在jquery&中得到这个div的id使这个div可见假?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨..
i已经在jquery中创建了动态div ...现在onbutton click事件我想让这个div显得虚假...我怎么做在jquery中获取此div的id并使此div可见false ???
请帮帮我...
hi..
i have created dynamic div in jquery...now onbutton click event i want to make visible false of this div...how do i get id of this div in jquery & make this div visible false???
please help me out...
推荐答案
Hi
试试这段代码..
Hi Try this code..
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="POC.WebForm2" %>
<!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 id="Head1" runat="server">
<title></title>
<script src="JQuery.js" type="text/javascript"></script>
<script type="text/javascript">
( function (){
(' < div id =mydiv>< / div>')。css({' height':' 100px',' width':' 100px',' background- color':' green'})。appendTo(' #form1');
('<div id="mydiv"></div>').css({ 'height': '100px', 'width': '100px', 'background-color': 'green' }).appendTo('#form1');
这篇关于我已经在jquery中创建了动态div ...现在onbutton click事件我想让这个div显而易见的假...我如何在jquery&中得到这个div的id使这个div可见假?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文