JavaScript 函数

来源:互联网 发布:java string类排序 编辑:程序博客网 时间:2024/06/14 00:13
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><title>网页标题</title><meta name="keywords" content="关键字列表" /><meta name="description" content="网页描述" /><link rel="stylesheet" type="text/css" href="" /><style type="text/css"></style><script type="text/javascript">//已知直角三角形的两个直角边,求斜边function qiuxiebian(a,b){var he=a*a+b*b;var xiebian=Math.pow(he,0.5);  //he的0.5次方return xiebian;}var bian=qiuxiebian(3,4);  //函数调用document.write("斜边为:"+bian);</script></head><body></body></html>