Jump to content
php.lv forumi

Javascript jauns_logs


Recommended Posts

Jokus pie malas. Viss nopietni -_-

 

Tiek izmantots jQuery.

Javascript:

<script language="javascript">
function jauns_logs(identifikators) {	
$(document).ready(function() { 
       $.blockUI({ 
	message: $('#jaunslogs'),
	 css: { 
               width: '520px', 
		}
	}); 
	$('.close').attr('title','Click to unblock').click($.unblockUI); 
}); 
}
</script>

 

Un diasplayed none div's, kurš pēc <a href="#" onclick="jauns_logs('1');">spied te</a> nospiešanas parādās.

 

<div style="display:none;" id="jaunslogs">

Chau

</div>

 

Kā var pēc tā Chau dabūt identifikatoru?

Es tiešām esmu nūģis javaskriptā.

Link to post
Share on other sites

php echo vietā ir js alert(), ja tu to domāji

 

Man nevajag alertus. Es biju domājis tā,ka to identifikatoru, kas tika piešķirts tai 'jauns_logs' funkcijai, viņu itkā echo aiz Chau

 

<div style="display:none;" id="jaunslogs">

Chau [identifikators te]

</div>

Link to post
Share on other sites

document.getElementById("jaunslogs").innerHTML += "blabla identifikators";

 

Paldies.Izdevās.

 

Dīvaini, kāpēc man likās, ka jābūt kaut kam līdzīgam echo variable.lol

Edited by who_i_am
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...