目前,我正在使用jquery,php和codeigniter编写程序 - 但是,我遇到了一个问题。jquery脚本不执行
当我使用codeigniter php框架编写视图文件时,我无法使用URL 127.0.0.1/ci/welcome/passdataview/6/7
执行JQuery。如果我使用127.0.0.1/ci/welcome/passdataview
,则可以执行JQuery脚本。
谁能告诉我如何在URL中使用codeigniter参数执行jquery脚本?
<html>
<head>
<script type="text/javascript" src="../js/jquery-1.7.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
alert ("here");
});
</script>
</head>
<body>
<div><h2>demo 1</h2></div>
<input type="hidden" id="hidden1" value="<?php echo $username;?>">
<input type="hidden" id="hidden2" value="<?php echo $subject;?>">
</body>
</html>
'' –
'127.0.0.1/ci/welcome/passdataview/6/7' doesn'在URL中没有任何“参数”。它是否意味着像“127.0.0.1/ci/welcome/passdataview?username = 6&subject = 7'? – verdesmarald