জাভাস্ক্রিপ্ট বা jQuery ব্যবহার করে <strong> এলিমেন্টের টেক্সট পরিবর্তন করা যায়। নিচে উদাহরণ দেওয়া হলো।
উদাহরণ
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>
<body>
<strong id="strongDemo">Replace This strong tag</strong>
<script>
$(document).ready(function(){
$("#strongDemo").html("Actual value of 5+10 is 15.....");
});
</script>
</body>
</html>
ফাইলটি index.html নামে সেভ করে VS Code-এ Open with Live Server অপশন দিয়ে চালান।
আউটপুট
ব্রাউজারে <strong> ট্যাগের টেক্সট পরিবর্তন হয়ে যাবে।