CSS code:
. Pop_box_2{Display:None;position:fixed; Left:43%;Top:35%;Margin-left:-225px;Margin-top:-137px;width:780px;Min-height:274px;background:#fff;Border:1px solid #107fae;Z-index:2;}. pop_box_2. Title{margin:0 Auto;width:100%;Padding-top:3px;hight:15px;}. pop_box_2. Title span{Display:Block;width:100px;Height:16px;margin:0 Auto;font-size:20px;}. pop_box_2. Close_pop_1{Display:Block;position:Absolute; Right:0px;Top:0px;width:24px;Height:24px;background:#07ad7d url (.. /images/close_pop.png) No-repeat Center Center;cursor:Pointer;}. pop_box_2. Close_pop_1:hover{Opacity:. 9}
JavaScript code:
functionMovetogen (APP) {varH = $ ("Body"). Height (); $(". Pop_bg"). CSS ("height", H + "px")); $(". Pop_bg"). Show (); $("#downUrl"). Val (APP). Parents ("tr"). Find ("Td:first"). text ()); $(". Pop_box_2"). Append ("<span class= ' close_pop_1 ' onclick= ' Closepop (); ' ></span> "); $(". Pop_box_2"). Show (); } functionClosepop () {$ (". ErrorMsg"). Children (). remove (); $("#downUrl"). Val (""); $(". Pop_bg"). Hide (); $(". Pop_box_2"). Hide (); }
HTML Code:
<Divclass= "POP_BG"></Div> <Divclass= "Pop_box_2"ID= "Pop_box_2"> <BR/> <BR/> <Divclass= "title"><span>Move into genuine</span></Div> <Divclass= "ErrorMsg"ID= "ErrorMsg" ></Div> <BR/> <BR/> <Divclass= "App_downurl"ID= "App_downurl"> <formID= "Appmsg"Action= "/movetogen"Method= "POST"> <Tableclass= "Jm_table"cellpadding= "0"cellspacing= "0"> <TRclass= "Table_tit"> <TDwidth= "18%">:</TD> <TD><inputtype= "text"ID= "Downurl"name= "Downurl"placeholder= "Please enter"size= "$"onchange= "Check (this," Please enter!) '); "/></TD> </TR> </Table> <BR/> </form> </Div> <Divclass= "Save"><imgclass= "Savebtn"src= "/detect/images/save.png"onclick= "Save ();"/></Div> <BR/> </Div>
Error prompt Code:
function Check (name,msg) { if(name.value== "") { $ (". ErrorMsg"). Children (). Remove () ; $ (". ErrorMsg"). HTML ("<span >" +msg+ "</span>"); return ; } Else { $ (". ErrorMsg"). Children (). remove (); }
Write a bullet box with JavaScript CSS