单击按钮后,javascript 在新选项卡上显示结果。但我希望结果显示在按钮下方。
<html>
<body>
<input type="button" id="button1" value="Click Here" onclick="print();"/>
<script type="text/javascript"> //script to do some task
function print()
{
document.write('My Text Goes here ');
}
</script>
</body>