比如有一页面
$def with (data)
<html>
<head>
<script>
function alertSth()
{
// data是一个列表,我想 alert data[0]
}
</script>
</head>
<body>
<input type="submit" onclick="alertSth()">
</body>
</html>
所以请教js代码里如何直接获取从web.py传过来的值?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
假设data[0]是个str: