How to call assigned function in javascript
How to call function assignment in javascript
function show(n)
{
$('.lightBox').css({
"width":"400px",
"height":"180px"
});
$("#lightBox").css("display", "block"); //I don’t know what this is for. If it’s no longer useful, delete it.
//$(".lightBox_wrap").css("display", "block"); //Remove this sentence
$('#' n).css({
"display":"block"; //Add a sentence
here"width":$('.lightBox').width(),
"height":$('.lightBox').height(),
"top": $(document).scrollTop() $(window).height()/2-$('.lightBox_wrap').height()/2,
"left":($(window).width()-$('.lightBox').width())/2
});
}
jquery pops up a layer! Can you pass a parameter to this layer?
function ShowDiv(show_div,bg_div){
document.getElementById(show_div).style.display='block';
document.getElementById(bg_div).style.display='block' ;
var bgdiv = document.getElementById(bg_div);
bgdiv.style.width = document.body.scrollWidth;
// bgdiv.style.height = $(document).height();
$("#"" bg_div).height($(document).height());
$("#" bg_div).append("canshu");
}; One is to give a parameter to the function function ShowDiv(show_div,bg_div,"canshu"){}
One is to use js to get the value at a specific location. For example, just get the alt attribute in
Put $("#MyDiv").append("Add your parameters"); in your function
How to use js to pop up a layer by clicking a button
Add a click event to the button, fill in a layer, and the width and height are 100%;
This is achieved, click the button to pop up a layer.
The above is the detailed content of How to call assigned function in javascript. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

This article addresses the Windows "INVALID_DATA_ACCESS_TRAP" (0x00000004) error, a critical BSOD. It explores common causes like faulty drivers, hardware malfunctions (RAM, hard drive), software conflicts, overclocking, and malware. Trou

This article provides practical tips for maintaining ENE SYS systems. It addresses common issues like overheating and data corruption, offering preventative measures such as regular cleaning, backups, and software updates. A tailored maintenance s

This article identifies five common pitfalls in ENE SYS implementation: insufficient planning, inadequate user training, improper data migration, neglecting security, and insufficient testing. These errors can lead to project delays, system failures

Article discusses editing Windows Registry, precautions, backup methods, and potential issues from incorrect edits. Main issue: risks of system instability and data loss from improper changes.

What does the drive health warning in Windows Settings mean and what should you do when you receive the disk warning? Read this php.cn tutorial to get step-by-step instructions to cope with this situation.

Article discusses managing Windows services for system health, including starting, stopping, restarting services, and best practices for stability.

This article identifies ene.sys as a Realtek High Definition Audio driver component. It details its function in managing audio hardware, emphasizing its crucial role in audio functionality. The article also guides users on verifying its legitimacy

This article addresses the failure of the Windows asio.sys audio driver. Common causes include corrupted system files, hardware/driver incompatibility, software conflicts, registry issues, and malware. Troubleshooting involves SFC scans, driver upda
