Noob需要帮助! 是否可以在页面的一部分中包含脚本?问题是表单的一部分需要JQuery链接而另一部分需要常规JQuery。这是代码:
$result=$result."
Выберите тематику: <select id='thematic' name='thmsel'>
<option></option>
<option value='fb'>Стадион</option>
<option value='sch'>Школа</option>
<option value='sw'>Бассейн</option>
</select>
Выберите раздел: <select id='catch' name='catsel'>
<option></option>
<option value='news' class='fb'>Новости</option>
<option value='articles' class='fb'>Статьи</option>
<option value='news' class='sch'>Новости</option>
<option value='articles' class='sch'>Статьи</option>
<option value='news' class='sw'>Новости</option>
<option value='articles' class='sw'>Статьи</option>
</select>
Выберите категорию: <select id='chap'name='chsel'>
<option></option>
<option value='world' class='news'>Мировые новости</option>
<option value='rf' class='news'>Новости РФ</option>
<option value='vlg' class='news'>Новости города</option>
<option value='our' class='news'>Наши новости</option>
<option value='useful' class='articles'>Полезное</option>
<option value='humour' class='articles'>Юмор</option>
</select>
<br>
<script src='jquery.chained.min.js'></script>
<script charset='utf-8'>
$(function(){
$('#catch').chained('#thematic');
$('#chap').chained('#catch');
});
</script>
";
$result=$result."
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'></script>
Заголовок новости:   <input type='text' name='title' value='' size='158'>
<input type='hidden' name='state' value='save' />
<textarea id='editor1' name='txt'></textarea></br>
<submit type='button' value='Save'></form>
<script type='text/javascript'>
var ckeditor1 = CKEDITOR.replace( 'editor1' );
AjexFileManager.init({
returnTo: 'ckeditor',
editor: ckeditor1
});
</script>
<script type='text/javascript'>
function save()
{
for ( instance in CKEDITOR.instances )
CKEDITOR.instances['editor1'].updateElement();
var data = $('#tdescription').val()
$.ajax({
type: 'POST',
url: 'index.php',
data: data,
success: function(html) {
alert('Сохранено');
}
});
}
</script>";
我知道我所做的事情无论如何都是错的,因为我试图连接3种不同类型的JQuery。这就是我在这里的原因 - 找出正确的方法。谢谢
P.S.&GT;我已经查看了搜索结果,但没有找到任何符合我需求的内容。