jquery: tags

master
Castro0o 5 years ago
parent b3df906620
commit a9fcc62ed2

@ -1,6 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script>
<meta charset="utf-8"> <meta charset="utf-8">
<title></title> <title></title>
<style> <style>
@ -157,6 +159,17 @@ function myFunction() {
text.style.display = "none"; text.style.display = "none";
} }
} }
$(document).ready(function(){
$('span').click(
function(){
alert($(this).text());
alert($(this).attr('class'));
});
})
</script> </script>

@ -1,6 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script>
<meta charset="utf-8"> <meta charset="utf-8">
<title></title> <title></title>
<style> <style>

Loading…
Cancel
Save