I have a page with a p tag and div element, the divis element is set with the display: this is not the case at the beginning , I just want to display the various devices shown below body tags on the click of P tag but I got stuck in the different ID of the division, please help me with this situation. Below is my code i thanks
& lt; Script & gt; Function toggle (id) // Here is a function that receives various IDs of div {var element = document.getElementById (ID); {if (element [i] .style.display == "none") for {i = 1; i & lt; 3; i ++} {element [i] .style.display = "block"; } And {element [i] .style.display = "none"}}} & lt; / Script & gt; & Lt; Body & gt; & Lt; P onclick = "toggle ('div1')" & gt; Sentence1 & lt; / P & gt; & Lt; P onclick = "toggle ('div2')" & gt; Sentence 2 & lt; / P & gt; & Lt; Div id = "div1" name = "name1" style = "display: none; width: 400px; height: 300px; border: 1px solid black; background color: yellow;" Id = "div1" & gt; Barun component & lt; / Div & gt; & Lt; Div id = "div2" style = "display: none; width: 400px; height: 300px; range: 1px solid black; background color: black;" id = "DIV2" & gt; Bhoopi & lt; / Div & gt; & Lt; / Body & gt; You only have one div, so you do not need a loop . Just use
function toggle (id) // Here is a function that receives different IDs of div {var element = document.getElementById (id); If (element.style.display == "none") {element.style.display = "block"; } And {element.style.display = "none"}}
Popular posts from this blog
I am trying to learn PDO, now I have written this small code, but it gives me a serious error: < P> Fatal error: Call a member function at a non-object dot () ... $ con = new mysqli ("127.0.0.1", "root", "", "csvdangercheck"); $ Query = $ con- & gt; ("Id,` var1`, `var2`) values (" id,: var1,: var2) ";); $ query- & gt; bypass pattern (': id', $ id); $ query- & gt; BindParam (': var1', $ VAL1); $ Query- & gt; bindParam (': var2', $ val2); $ Query-> Executed (); I Trying to use print_r ($ con-> errorInfo ()) but Fatal error: Undefined method mysqli :: errorInfo ( ) ... can someone tell me what am I missing? Flaffeh said, you have PDO Missing Mysqy, try it: $ con = new PDO ('mysql: host = 127.0.0.1; dbname = csvdangercheck', 'root', '');
For a specific set of tasks, I need to log in to the incoming request inputstream as well as outgoing response. is. I am using an ActionFilterAttribute for this and overriding the OnActionExecuted and OnResultExecuted methods. So I'm starting with this idea ... Public category ActionLoggerAttribute: ActionFilterArrbit {Public Override Zero On-Offed Execution (ActionActioned Contact Filter Filter) {base.OnActionAxecuted (FilterContext); HttpRequestBase request = filterContext.HttpContext.Request; // TODO: Log the request. InputStream} Public Override Zero OnResultExecuted (ResultExecutedContext FilterContext) {base.OnResultExecuted (filterContext); HTTPRPSPointBase Response = FilterContacts Hpptex response; // TODO: Log on Response.OutputStream}} Ideally I'll hook it up with enterprise library logging because I'm already using it for error logging. Am I reaching the input and output stream at the right time? Can I easily use the Enterprise Library to log i
I am trying to create Java web framework (and learning), and on the basis of 'Code Generator In the process of making the material view of the database in the process of development, I stumbled into a difficulty, which I do not know how to solve it. First of all, I want the following index.jsp : & lt; Body & gt; Use all pages to be created. & Lt;% @ include file = "header.jsp"% & gt; & Lt; Hours / & gt; & Lt;% @ included file = "body.jsp"%> & Lt; Hours / & gt; & Lt;% @ include file = "footer.jsp"% & gt; & Lt; / Body & gt; And, in body.jsp , I should have it like this: & lt; Jsp: include page = "$ {Application_modul}"%> Where application_modul is an attribute defined in its controller: request.setAttribute ("application_modul", "USER_ACCOUNT \\ ' View_user_account.jsp "); This file can be found properly, but the processed JSP does
Comments
Post a Comment